2015-09-02 194 views
1

這是我第一次發佈到stackoverflow,我搜索了論壇但找不到任何答案。我在創建MySQL服務器,與MySQL服務器建立ssh連接以及MySQL Workbench方面是全新的。有三臺運行Workbench CE(版本6.3)的Windows PC和一臺運行MySQL CE的Ubuntu Linux PC。服務器和PC位於家庭網絡中。服務器的IP地址是192.168.1.215; PC的IP地址是動態的。每臺PC都收到相同的錯誤信息。 MySQL服務器安裝在Linux Ubuntu服務器上。我可以使用Windows PC上的Putty從Windows登錄MySQL。無法使用ssh連接從MySQL工作臺連接到MySQL服務器


在Workbench中,我爲服務器設置了端口地址3306。試圖連接到使用MySQL工作臺

Could not connect the SSH Tunnel 
Authentication error, unhandled exception caught in in 
tunnel manager, please refer to logs for details 

我發現日誌文件,wb.log MySQL服務器,在Windows PC上時,我收到此錯誤信息。 wb.log超過100行,並附上最後25行,顯示錯誤消息。

10:34:12 [INF][ WBContext]: System info: 
MySQL Workbench Community (GPL) for Windows version 6.3.4 revision 0 build 828 (64 bit) 
Configuration Directory: C:\Users\Daddio\AppData\Roaming\MySQL\Workbench 
Data Directory: C:\Program Files\MySQL\MySQL Workbench 6.3 CE 
Cairo Version: 1.10.2 
OS: Microsoft Windows 7 Professional Service Pack 1 
CPU: 8x Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz, 32.0 GiB RAM 
Active video adapter ATI Radeon HD 4800 Series 
Installed video RAM: 1024 MB 
Current video mode: 1280 x 1024 x 4294967296 colors 
Used bit depth: 32 
Driver version: 8.920.0.0 
Installed display drivers: 
aticfx64.dll,aticfx64.dll,aticfx32,aticfx32,atiumd64.dll,atidxx64.dll,atiumdag,atidxx32,atiumdva,atiumd6a.cap,atitmm64.dll 
Current user language: English (United States) 

10:34:12 [INF][ Workbench]: UI is up 
10:34:12 [INF][ Workbench]: Running the application 
10:34:14 [INF][ SSH tunnel]: Starting tunnel 
10:34:14 [INF][ SSH tunnel]: Existing SSH tunnel not found, opening new one 
10:35:55 [INF][ SSH tunnel]: Opening SSH tunnel to 192.168.1.215:3306 
10:35:55 [WRN][sshtunnel.py:_connect_ssh:288]: IOError, probably caused by file C:\Users\Daddio\AppData\Roaming\MySQL\Workbench\ssh\known_hosts not found, the message was: [Errno 2] No such file or directory: u'C:\\Users\\Daddio\\AppData\\Roaming\\MySQL\\Workbench\\ssh\\known_hosts' 
10:35:55 [ERR][sshtunnel.py:notify_exception_error:233]: Traceback (most recent call last): 
File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE\sshtunnel.py", line 298, in _connect_ssh 
look_for_keys=has_key, allow_agent=has_key) 
File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\client.py", line 301, in connect 
t.start_client() 
File "C:\Program Files\MySQL\MySQL Workbench 6.3 CE/python/site-packages\paramiko\transport.py", line 461, in start_client 
raise e 
SSHException: Error reading SSH protocol banner[Errno 10053] An established connection was aborted by the software in your host machine 

10:35:56 [INF][ SSH tunnel]: TunnelManager.wait_connection authentication error: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details 
10:35:56 [ERR][ SSH tunnel]: Authentication error opening SSH tunnel: Authentication error, unhandled exception caught in tunnel manager, please refer to logs for details 
10:37:26 [INF][ WBContext]: Connection to LINUXSERVER cancelled by user: Tunnel connection cancelled 
10:37:29 [INF][ Workbench]: Shutting down Workbench 
10:37:29 [INF][ mforms managed]: Shutting down mforms wrapper 
10:37:29 [INF][ Workbench]: Done 

回答

-1

我如何解決它在Windows 7:

  1. 打開C:/Users/User/.ssh/known_hosts(或您的系統是如何設置的)
  2. 找到這一行:192.168 .1.215 SH-RSA AAAAB3NzaC1yc2EAAAADAQABAAA ....
  3. 取下整段(確保你不刪除其它存儲的主機)
  4. 嘗試用MySQL工作臺重新連接

我希望這會有助於:)因爲我花了數小時試圖挖掘出來。

+0

謝謝你的幫助。不幸的是,known_hosts文件不包含以下行:192.168.1.215 sh-rsa AAAAB3NzaC1yc2EAAAADAQABAAA ....有4行開頭:192.30.252.131,192.30.252.129,192.30.252.130和192.30.252.128。所以,沒有什麼可以刪除的。 – user3723239

5

如果您使用Ubuntu,您可能需要手動更新您的MySQL Workbench版本。這是版本6.0.8中的一個錯誤,它目前是Ubuntu存儲庫中的錯誤。更新到版本6.3.6爲我解決了這個問題。

下載這裏:http://dev.mysql.com/downloads/workbench/#downloads

+0

是的。繼續並確保您至少有6.3版本的MySQL工作臺。否則你將會調試一段時間,在6.2版本中遇到的ssh隧道存在bug –

1

我已經經歷了,當我更新的mysql-工作臺這個問題。你需要做的是通過pip升級paramiko。

pip install --upgrade pip 
pip install paramiko 

這將安裝使用ssh隧道的crypto軟件包。

-1

我通過在ubuntu 16.04中降級python-crypto軟件包來解決這個問題。 使用以下命令回滾版本2.6.1-6ubuntu0.16.04.2至2.6.1-6build1。

sudo apt-get install python-crypto=2.6.1-6build1