Home > Database > Mysql Tutorial > 如何设置mysql允许外部连接访问

如何设置mysql允许外部连接访问

WBOY
Release: 2018-10-29 16:34:53
forward
3384 people have browsed it

这篇文章主要介绍了如何设置mysql允许外部连接访问,有一定的参考价值,感兴趣的朋友可以参考一下,希望对你有所帮助!

错误信息: SQL Error (1130): Host ‘192.168.1.88’ is not allowed to connect to this MySQL server 

说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。

需更改 mysql 数据库里的 user表里的 host项
把localhost改称%
登录mysql服务器,执行以下命令
mysql>use mysql;
mysql>update user set host = ‘%’  where user =’root’;
mysql>flush privileges;
mysql>quit

备注:云服务器设置远程访问别忘了开放3306端口,否则连接不上

【相关教程推荐】

1. mysql数据库图文教程 

2. MySQL 5.1参考手册下载 

3. bootstrap教程 

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template