无法通过SSH使用Workbench连接到Digitalocean上的mysql [英] Unable to connect to mysql on digitalocean using workbench over ssh

查看:181
本文介绍了无法通过SSH使用Workbench连接到Digitalocean上的mysql的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用laravel应用程序和数据库设置了我的液滴.在腻子ssh上创建了我的数据库.现在,当我尝试以镜像方式连接到我的mysql数据库时,出现错误.

I have got my droplet set with the laravel app and database. Created my db while on putty ssh. Now when I am trying to connect to my mysql database as in image, i am getting error.

错误:身份验证错误,隧道管理器中捕获了未处理的异常,请查阅日志以获取详细信息.

Error: Authentication error, unhandled exception caught in tunnel manager, plese refer to logs for details.

请注意,我的凭据是正确的,因为我用来通过腻子进行连接.关于如何查看我的数据库有任何帮助吗?

Note that my credentials are right, as that what I use to connect through putty. Any help on how can I see view my database?

推荐答案

这样解决了.

原来,这是一个ssh级别的问题.数字海洋服务器不支持错误中提到的Kex算法,可以通过以下操作来解决此问题.

Turns out this is an ssh level issue. The digital ocean server doesn't have the support for the Kex algorithm as mentioned in the error the following can be done to fix this.

需要在数字海洋服务器本身上完成以下步骤

Following steps needs to be done on the digital ocean server itself

1-将以下行添加到数字海洋服务器上的该文件

1- Add the following lines to this file on the digital ocean server

$ sudo vim/etc/ssh/sshd_config

$ sudo vim /etc/ssh/sshd_config

Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,hmac-sha1
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1

2-重新启动服务器上的ssh服务

2- Restart the ssh service on the server

$ sudo服务ssh重新启动

$ sudo service ssh restart

现在尝试再次连接mysql workbench,您应该看到该错误消失了.如果不成功,请检查日志中是否有更多错误,但这对我有用.

Now try connecting with mysql workbench again you should see that error gone. Check the logs for more errors if not successful but this did the trick for me.

这篇关于无法通过SSH使用Workbench连接到Digitalocean上的mysql的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆