Home > Database > Mysql Tutorial > linux下允许外部ip访问你到mysql数据库_MySQL

linux下允许外部ip访问你到mysql数据库_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:41:58
Original
1070 people have browsed it

bitsCN.com linux下允许外部ip访问你到mysql数据库 1:设置mysql 的配置文件     /etc/mysql/my.cnf     找到 bind-address  =127.0.0.1  将其注释掉;//作用是使得不再只允许本地访问;重启mysql:/etc/init.d/mysql restart;     2:进入mysql 数据库      mysql -u  root -p     mysql>grand all privileges on  *.*  to root@'%'  identifies  by ' xxxx';    其中 第一个*表示数据库名;第二个*表示该数据库的表名;如果像上面那样 *.*的话表示所有到数据库下到所有表都允许访问;                  ‘%’:表示允许访问到mysql的ip地址;当然你也可以配置为具体到ip名称;%表示所有ip均可以访问;             后面到‘xxxx’为root 用户的password;   作者 xc635960736 bitsCN.com

Related labels:
source:php.cn
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
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template