navicat远程访问mysql失败,can't connect(10038)

栏目: 数据库 · 发布时间: 6年前

内容简介:目前总结以下解决步骤:

目前总结以下解决步骤:

  1. 查看是否连接成功?

    本机进入 cmd
    输入命令:

    telnet 109.2.34.55 3306

    【109.2.34.55】为 你的实例 公网IP

  2. 先查看下 阿里云/百度云等实例 的 安全组规则入方向 :3306 端口是否开启? 如:
    navicat远程访问 <a href='https://www.codercto.com/topics/18746.html'>mysql</a> 失败,can't connect(10038)

    上面就是允许访问了, 没有就添加规则 ,允许3306端口~

    执行步骤1,看看可能连接了

  3. 如果还不能,那么登录服务器,在Ubuntu等 中查看3306端口

    netstat -anp | grep 3306

    tcp 0 127.0.0.1:3306 0.0.0.0:* LISTEN 2160/mysqld

    那么,

    sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
    修改msyqld.cnf 中的 bind-address=127.0.0.1bind-address = 0.0.0.0

    保存退出

    重启 命令:

    service mysql restart

    我遇到的两种情况基本OK了

    执行步骤1,看看可能连接了

  4. 另外一种(mysql可能拒绝你的ip访问):

    进入mysql,对远程用户进行授权,

    命令:

    msyql -u root -p
    grant all privileges on *.* to 'root'@'%' identified by 'xxxxxx';

    xxxxxx 为密码,最后:

    flush privileges;

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Beginning iPhone and iPad Web Apps

Beginning iPhone and iPad Web Apps

Chris Apers、Daniel Paterson / Apress / 2010-12-15 / USD 39.99

It seems that everyone and her sister has developed an iPhone App—everyone except you, the hard-working web professional. And now with the introduction of the iPad, you may even feel farther behind. B......一起来看看 《Beginning iPhone and iPad Web Apps》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换