Home > Database > Mysql Tutorial > mysql新建用户及授权_MySQL

mysql新建用户及授权_MySQL

WBOY
Release: 2016-06-01 11:52:26
Original
1054 people have browsed it

mysql新建用户和授权的方法总是记不住,在此记下来

创建用户 create user 'username'@'host' identified by 'password';

用户授权 grant all on databasename.tablename to 'username'@'hostname' identified by 'password';

生效命令 flush privileges;

设置任何机器都可以通过已有用户名访问mysql数据库 uodate user set host='%' where user='username';

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