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

mysql新建用户及授权_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 11:52:261110browse

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';

Statement:
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