Windows 7 でリモート サーバー (MariaDB 10) に接続しようとしています。
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
ユーザーは以下のように権限を付与します
GRANT ALL PRIVILEGES ON *.* TO 'remote'@'%' IDENTIFIED BY PASSWORD
そして、私はこれらのコマンドを試しました
>> 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
すぐにエラー応答を取得しました。
システム エラー:54 で他の状況が見つかりません。
IPとポートを使用してローカルホストで同じmysqlコマンドを試したところ、ログインできました。
- Switch側のファイアーウォールの設定の問題でしょうか?(コマンドnc -vzで問題なく動作しています。)
- データベースの設定の問題ですか?(localhostでは問題なく動いています。)