Navicat远程连接mysql数据库

本文介绍了如何配置MySQL以允许远程连接,包括检查服务状态、开放端口、修改配置文件和授权用户,确保从外部主机可以成功连接到数据库。
摘要由CSDN通过智能技术生成

第一,首先能ping通mysql数据库所在的主机。

第二,telnet mysql数据库的端口号 。如果不行,要在防火墙,高级设置里面,配置入站规则;开放3306端口。

第三,如果还不行,结合下面两个网址

http://blog.csdn.net/a19881029/article/details/50805562

,总结如下:

第一步:

mysql服务没问题:

[plain]  view plain   copy
  在CODE上查看代码片 派生到我的代码片
  1. sean@sean:~$ ps -ef|grep mysqld  
  2. mysql      1219      1  0 21:09 ?        00:00:01 /usr/sbin/mysqld  
  3. sean      10373   9602  0 21:38 pts/7    00:00:00 grep --color=auto mysqld  

并且本地的登录也能成功:

[plain]  view plain   copy
  在CODE上查看代码片 派生到我的代码片
  1. sean@sean:~$ mysql -u root -h 127.0.0.1  
  2. Welcome to the MySQL monitor.  Commands end with ; or \g.  
  3. Your MySQL connection id is 40  
  4. Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)  
  5.   
  6. Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.  
  7.   
  8. Oracle is a registered trademark of Oracle Corporation and/or its  
  9. affiliates. Other names may be trademarks of their respective  
  10. owners.  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值