I try to connect to the remote server(MariaDB 10) on windows 7.
The server setting in my.ini
datadir=E:/MariaDB 10/data
port=3306
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
default_storage_engine=innodb
innodb_buffer_pool_size=2042M
innodb_log_file_size=50M
feedback=ON
character-set-server=utf8
skip-name-resolve
[client]
port=3306
The user grant privileges as below
GRANT ALL PRIVILEGES ON *.* TO 'remote'@'%' IDENTIFIED BY PASSWORD
And I had tried these command
>> nc -vz ip port
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif en0
src 192.168.31.242 port 58576
dst xxx.xxx.xx.xx port xxxx
rank info not available
TCP aux info available
Connection to xxx.xxx.xx.xx port xxx [tcp/creativepartnr] succeeded!
>>telnet xxx.xxx.xx.xx port
Trying xxx.xxx.xx.xx...
Connected to xxx.xxx.xx.xx.
Escape character is '^]'.
Connection closed by foreign host.
>>mysql -uremote -p -hxxx.xxx.xx.xx --port=xxxx
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 54
Got the error response immediately.
Can't find any other's situation with system error:54.
I tried the same mysql command on localhost with ip and port and it could be logined.
- Is it the firewall setting problem on the Switch?(It's worked fine with command nc -vz.)
- Is it the database setting problem?(It's work well on localhost.)