无法使用 MySQL Workbench 远程连接到 MySQL 服务器 [英] Can't connect remotely to MySQL Server with MySQL Workbench

查看:153
本文介绍了无法使用 MySQL Workbench 远程连接到 MySQL 服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我尝试通过工作台连接远程 mysql 服务器时.它给了我一个错误

Every time when I'm trying to connect remote mysql server through workbench. It gives me an error

无法在远程服务器10061"上连接 mysql

can't connect mysql on remote server '10061'

但我可以连接 phpmyadmin.

But I am able to connect with phpmyadmin.

推荐答案

MySQL 在默认情况下仅侦听 localhost 作为安全预防措施.您可能需要确保 MySQL 正在侦听您的外部 IP 接口:请按照以下步骤操作:

MySQL on default only listens to localhost as a security precaution. You might need to make sure MySQL is listening on your external IP interface: Follow the steps:

nano/etc/mysql/my.cnf

nano /etc/mysql/my.cnf

编辑您服务器上的 MySQL 配置文件并转到以下行:

Edit the MySQL configuration file on your server and go to the following line:

绑定地址 = 127.0.0.1

IP 地址 127.0.0.1 表示您的 MySQL 仅侦听 localhost.改成

The IP address 127.0.0.1 means your MySQL is only listening localhost. Change it to

绑定地址 = 0.0.0.0

现在 MySQL 将侦听所有 IP 地址.

Now MySQL will listen all IP Address.

这篇关于无法使用 MySQL Workbench 远程连接到 MySQL 服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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