Home > Database > Mysql Tutorial > MySQL创建用户并设置访问控制权限

MySQL创建用户并设置访问控制权限

WBOY
Release: 2016-06-07 16:55:13
Original
1178 people have browsed it

MySQL创建用户并设置访问控制权限语法:GRANT ALL PRIVILEGES ON *.* TO

MySQL创建用户并设置访问控制权限语法:

GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

说明:

1、"*.*"是设置此用户对数据库和表的控制。例如设置此用户可以控制mysql库的user表,,那么就应该写成"mysql.user"。

2、"%"是设置此用户允许访问的主机。

3、"username"访问数据库的用户。

4、"password"访问数据库的密码。

linux

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template