最新消息:

2003 – Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

其他技术 koic_zhzz 415浏览 0评论

Windows系统(远程方)

Windows系统功能

1. 启动telnet客户端

  1. 需要启动 telnet客户端( 安装完,最好重启电脑 )
    2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错
  2. telnet 连通性测试:
    Win +r -> cmd -> Telnet www.baidu.com 80
    回车后:出现如下界面表示功能正常
    2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

2. 启动MySQL服务

  1. mysql服务:
    2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

Linux系统(接受方)

防火墙与MySQL

1. 防火墙

  1. 开放端口:
  • 编辑 /etc/sysconfig/iptables文件:

vi /etc/sysconfig/iptables

  • 加入内容(允许 3306端口),保存并退出:

-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT

  • 重启防火墙服务:

/etc/init.d/iptables restart

  1. 永久关闭防火墙:
  • 永久关闭防火墙(重启也生效)

chkconfig iptables off

2. mysql

注:最好避开 root 跟 localhost ,不然可能会连接到本地mysql。

  1. 登录mysql:

mysql -uroot -p密码
use mysql;

  1. 创建用户: create user ‘用户名’@‘主机名’ identified by ‘密码’;

create user ‘zhangsan’@‘192.168.43.177’ identified by ‘A-B-c-123’;
grant all on * . * to ‘zhangsan’@‘192.168.43.177’ identified by ‘A-B-c-123’;
grant all on * . * to ‘zhangsan’@‘%’ identified by ‘A-B-c-123’;
flush privileges;

  1. 查看用户:

select user,host from user;

 

2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

Navicat Premium连接

测试远程登录:

2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

  1. 说明已经成功远程操纵数据库了。
    2003 - Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

本文转载自:https://blog.csdn.net/nuuih/article/details/124303112

转载请注明:落伍老站长 » 2003 – Can‘t connect to MySQL server on ‘‘ ‘‘ (10060 “Unknown error“)Navicat 报错

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址