navicat远程连接mysql,2003 can't connect to mysql server on 10038
2017-09-04 22:46
786 查看
连接远程服务器的mysql,如果出现问题,很大问题会出在服务器的端口和授权问题。
首先我们通过
①:netstat -an | grep 3306
来查看mysql默认的端口3306是否开启,允许哪个ip使用,如果你发现,前面有127.0.0.1,就说明,3306端口只能本机ip使用
所以,我们需要
②:打开mysql配置文件 sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1注销
或改为bind-address = 0.0.0.0
③:进入mysql,mysql -u root -p
输入密码
对远程用户进行授权,
grant all privileges on *.* to 'root'@'%' identified by 'xxxxxx';
这里的root 是你远程登录的用户,xxxxxx是你登录使用的密码,然后可以在mysql数据 表中查看到你这个用户已经被添加到user表中。
④:修改生效,mysql>FLUSH PRIVILEGES;
⑤:退出,mysql>EXIT
⑥:重启MySQL服务,service mysqld restart
首先我们通过
①:netstat -an | grep 3306
来查看mysql默认的端口3306是否开启,允许哪个ip使用,如果你发现,前面有127.0.0.1,就说明,3306端口只能本机ip使用
所以,我们需要
②:打开mysql配置文件 sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1注销
或改为bind-address = 0.0.0.0
③:进入mysql,mysql -u root -p
输入密码
对远程用户进行授权,
grant all privileges on *.* to 'root'@'%' identified by 'xxxxxx';
这里的root 是你远程登录的用户,xxxxxx是你登录使用的密码,然后可以在mysql数据 表中查看到你这个用户已经被添加到user表中。
④:修改生效,mysql>FLUSH PRIVILEGES;
⑤:退出,mysql>EXIT
⑥:重启MySQL服务,service mysqld restart
相关文章推荐
- navicat远程连接mysql,2003 can't connect to mysql server on 10038
- 转:navicat远程连接mysql,2003 can't connect to mysql server on 10038
- 关于使用navicat for mysql在建立数据库连接时出现的2003 can't connect to mysql server on'localhost'(10038)问题
- 【0013】navicat连接mysql出现提示,2003 - Can‘t connect to MySQL server on 'localhost'(10038)
- Navicat连接mysql 2003 - Can't connect to MySQL server on ' '(10038)
- Navicat连接远程mysql数据库error报错2003 can't connect to mysql server on 10038解决办法
- win10连接navicat 连接mysql server时遇到2003-Can't connect to MySQL server on 'localhost'(10038)错误
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'(111) 的问题
- navicat for mysql 远程连接数据库时出现2003-Can't connect to Mysql on '主机名'(10061)解决方法
- Navicat 远程连接mysql数据库 2003:Can't connect to MySQL server (10060) /1130: Host '192.168.1.3' is not all
- 使用navicat连接mysql 报错:2003-Can't comment to Mysql server on '192.168.X.X'(10038)
- MySQL远程连接ERROR 2003 (HY000):Can't connect to MySQL server on'XXXXX'的问题
- Navicat连接MySQL数据库错误2003 - Can't connect to MySQL server on 'localhost'(6)
- (笔记)远程连接MySQL出现ERROR 2003 (HY000): Can't connect to MySQL server on ip (111)
- mysql中连接失败2003(Can't connect to server on 'localhost'(10038))错误解决办法
- MySQL远程连接ERROR 2003 (HY000):Can\'t connect to MySQL server on\'XXXXX\'的问题
- ubuntu下面navicat连接本地数据库出现2003 - Can't connect to MySQL server on 'localhost'(10061 Unknown errort;)
- navicat for mysql 远程连接数据库时出现2003-Can't connect to Mysql on '主机名'(10061)解决方法
- Navicat for Mysql连接mysql数据库时出现 2003-Can't connect to MySql server on 'localhost'(10061)
- 阿里云服务器安装mysql远程工具连接报Can't connect to MySQL server on 'X.X.X.X'(10038)