我正在尝试从Windows 10连接到Ubuntu 14.04。我正在使用ssh。
连接似乎已经成功登录到机器上,但无法连接到数据库。我知道我使用的是正确的密码。
错误信息为:
日志显示:
我正在连接的用户是按以下方式创建的:
我可以这样从远程的Ubuntu机器连接:
Failed to connect to MYSQL at localhost:3306 through SSH tunnel at username@xx.xx.xx.xx with user xxxx
Unable to establish SSL connection
日志显示:
12:27:02 [INF][ SSH tunnel]: Existing SSH tunnel not found, opening new one
12:27:06 [INF][ SSH tunnel]: Opening SSH tunnel to xx.xx.xx.xx:22
12:27:08 [INF][ SSH tunnel]: TunnelManager.wait_connection returned OK
12:27:08 [INF][sshtunnel.py:set_keepalive:502]: SSH KeepAlive setting skipped.
12:27:08 [INF][ SSH tunnel]: SSH tunnel connect executed OK
我正在连接的用户是按以下方式创建的:
mysql> create database fred
mysql> CREATE USER 'fred'@'localhost' IDENTIFIED BY 'xxxx';
mysql> CREATE USER 'fred'@'%' IDENTIFIED BY 'xxx';
mysql> grant all privileges on fred.* to 'fred'@'x';
mysql> grant all privileges on fred.* to 'fred@'%'
我可以这样从远程的Ubuntu机器连接:
mysql --user=fred --host=xx.xx.xx.xx --port=3306 -p
/var/log/mysql中没有提到连接
/var/log/auth显示
Dec 7 14:03:46 www.example.com sshd[14474]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
Dec 7 14:03:47 www.example.com sshd[14474]: Accepted publickey for root from xx.xx.xx.xx port 53591 ssh2: RSA ...
Dec 7 14:03:47 www.example.com sshd[14474]: pam_unix(sshd:session): session opened for user root by (uid=0)
SSH连接是使用root用户,但我尝试了使用非root用户,结果没有任何区别。
以下是连接选项卡中的详细信息:
SSH Hostname: xx.xx.xx.xx
SSH Username root
SSH KeyFile: [dir]\.ssh\id_rsa
MySQL Hostname:localhost
MySQL Server Port: 3306
username: xxxx