I am having trouble with running sysbench on Azure DB for MySQL. I have a sysbench server on a Azure VM which I am using to connect to Azure MySQL server through remote host. I have used this same sysbench server setup to benchmark another VM on Azure without this issues, but have been receiving the error on Azure DB for MySQL. I have modified below server parameters as well, but the issue persists.
- max_allowed_packet 536870912 --> 1073741824
- wait_timeout 120 --> 2147483
- innodb_lock_wait_timeout 50 --> 1073741824
- net_read_timeout 120 --> 31536000
- net_write_timeout 240 --> 31536000
The sysbench command has been modified to test if it allows to insert even just 1 entry but is still failing.
sudo sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=<hostname> --mysql-port=3306 --mysql-user=<username>
--mysql-password=<password> --mysql-db=sysbenchmark --db-driver=mysql --tables=1 --table-size=1 --threads=1 prepare
**OUTPUT**
sysbench 1.0.17 (using system LuaJIT 2.0.4)
Creating table 'sbtest1'...
FATAL: mysql_drv_query() returned error 2013 (Lost connection to MySQL server during query) for query 'CREATE TABLE sbtest1(
id INTEGER NOT NULL AUTO_INCREMENT,
k INTEGER DEFAULT '0' NOT NULL,
c CHAR(120) DEFAULT '' NOT NULL,
pad CHAR(60) DEFAULT '' NOT NULL,
PRIMARY KEY (id)
) /*! ENGINE = innodb */ '
FATAL: `sysbench.cmdline.call_command' function failed: /usr/share/sysbench/oltp_common.lua:197: SQL error, errno = 2013, state = 'HY000': Lost connection to MySQL server during query