ssh経由でphpmyadminを使用して、ローカルホスト(CentOS)からリモートホスト(CentOS)のmysqlデータベースに接続しようとしています。
ローカルの config.inc.php に以下を追加しました:
$i++;
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['AllowNoPassword'] = FALSE;
次に、トンネルを確立しましssh -Ng -L 3307:127.0.0.1:3306 root@xx.xx.xx.xx
た。コマンドラインから正常に動作します。
mysql -P 3307 -h localhost -u root -p dbname
しかし、アクセスしようとすると、http://localhost:3307/phpmyadmin/
「5.5.20 J��� 5.5.20�p��#p-.<'J}�ÿ÷�€����������[ 0{=^@fa2tq^�mysql_native_password�!��ÿ„#08S01パケットの順序が正しくありません"