简体   繁体   English

通过SSH通过Toad访问MySQL

[英]Accessing MySQL with Toad via SSH

I'm giving Toad a try for use with my MySQL db, but I cannot seem to connect (Linux-based server with MySQL database) remotely using Toad. 我正在尝试将Toad与我的MySQL数据库一起使用,但是似乎无法使用Toad远程连接(基于Linux的服务器和MySQL数据库)。 After entering the right credentials for both SSH login and the database login, I still get this: 在为SSH登录名和数据库登录名输入正确的凭据后,我仍然得到以下信息:

'Access denied for user 'wlaprise'@'166.203.5.139' (using password: YES)' '拒绝访问用户'wlaprise'@'166.203.5.139'(使用密码:是)”

I can however successfully login remotely using SSH and MYSQL commands directly from the command line using the same host and credentials, so I believe the credentials and firewall settings are not the problem. 但是,我可以使用相同的主机和凭据直接从命令行使用SSH和MYSQL命令成功远程登录,因此我相信凭据和防火墙设置不是问题。 The username is the same for both SSH and the db (not the smartest, I know), so I even tried reversing the password entries in case I had the credentials switched. SSH和数据库的用户名都相同(我知道这不是最聪明的用户名),因此,即使切换了凭据,我什至尝试反转密码条目。 No difference. 没有不同。

I looked through Toad's 'Connection Properties' to see if it was encrypting my credentials somehow which could explain the 'Access denied' error, but didn't see anything. 我查看了Toad的“连接属性”,看它是否以某种方式对我的凭据进行了加密,这可以解释“访问被拒绝”错误,但是什么也没看到。

This has to be basic, but I don't see what I'm missing? 这必须是基本的,但是我看不到我所缺少的吗? Ideas? 想法? Thanks. 谢谢。

When you are using shell command line , then you are connecting from localhost, thus effective permissions are 'wlaprise'@'localhost' 当您使用shell命令行时,您将从本地主机连接,因此有效权限为'wlaprise'@'localhost'

What you can do is to grant permissions to same user, but from different location/IP: 您可以做的是向同一用户但从不同位置/ IP授予权限:

GRANT ALL PRIVILEGES ON *.* TO 'wlaprise'@'166.203.5.139' 
    IDENTIFIED BY PASSWORD 'mypassword';

or 要么

GRANT ALL PRIVILEGES ON *.* TO 'wlaprise'@'%' 
    IDENTIFIED BY PASSWORD 'mypassword';

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM