如何远程连接MySQL数据库服务器?
我正在尝试连接到 MySQL 数据库服务器(远程),但无法连接。我正在使用具有授予权限的用户(不是 root 用户)。错误消息如下:
无法从服务器获取数据库列表。 用户“myuser”@“mypcname”的访问被拒绝(使用密码:YES)
“myuser”是我创建的具有授予访问权限的用户。该用户允许我本地连接到每个数据库。我在两台主机中使用相同的软件版本:MySQL Server 4.1(服务器)和 EMS SQL Manager 2005 for MySQL,版本 3.7.0.1(客户端)。
关键是我需要使用不同的用户而不是 root 用户连接到远程服务器。那么,如何建立连接呢?
谢谢。
I am trying to connect to a MySQL database server (remote), but I can't. I am using an user with grant privileges (not root user). The error message is the following:
Can't obtain database list from the server.
Access denied for user 'myuser'@'mypcname' (using password: YES)
"myuser" is an user I created with grant access. This user allows me to connect locally to every database. I am using the same software versions in both hosts: MySQL Server 4.1 (server) and EMS SQL Manager 2005 for MySQL, edition 3.7.0.1 (client).
The point is that I need to connect to the remote server using a different user, not root user. So, how to make the connection?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您必须确保远程用户帐户与服务器将看到的连接帐户相匹配。例如:
如果
mypc
无法通过 DNS 或主机文件在服务器上解析,则该功能将不起作用。在这种情况下,您可以尝试使用 IP 或 FQDN:You have to make sure that the remote user account matches what the server will see coming in for a connection. For instance:
will not work if
mypc
is not resolvable on the server via DNS or the hosts file. In this case, you could try either using an IP, or a FQDN:请查看 connectionstrings.com,看看您是否拥有用于 MySql。
Look in connectionstrings.com to see if you have the right connection string used for MySql.
确保
Make sure