Home > Database > Mysql Tutorial > mysql设置指定ip远程访问连接实例_MySQL

mysql设置指定ip远程访问连接实例_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:05:42
Original
1151 people have browsed it

本文实例讲述了mysql设置指定ip远程访问连接的方法,分享给大家供大家参考。具体实现方法如下:

1. 授权用户root使用密码jb51从任意主机连接到mysql服务器:

代码如下:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'jb51' WITH GRANT OPTION;
flush privileges;


 
2.授权用户root使用密码jb51从指定ip为218.12.50.60的主机连接到mysql服务器:

代码如下:

GRANT ALL PRIVILEGES ON *.* TO 'root'@'218.12.50.60' IDENTIFIED BY 'jb51' WITH GRANT OPTION;
flush privileges;

希望本文所述对大家的MySQL数据库程序设计有所帮助。

Related labels:
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