码迷,mamicode.com
首页 > 数据库 > 详细

【SQL篇章--基于MySQL5.7--创建用户】

时间:2016-12-07 20:02:00      阅读:265      评论:0      收藏:0      [点我收藏+]

标签:bsp   word   style   ring   for   ant   user   uri   sel   

SQL:
 
创建用户:>=MySQL5.7.6
查看用户:
mysql> select user,host,authentication_string from mysql.user;
ALTER USER:
ALTER USER [IF EXISTS]USER() IDENTIFIED BY ‘auth_string‘;
 
ADDING USER ACCOUNT:
CREATE USER ‘finley‘@‘localhost‘ IDENTIFIED BY ‘some_pass‘; GRANT ALL PRIVILEGES ON *.* TO ‘finley‘@‘localhost‘ WITH GRANT OPTION;
CREATE USER ‘finley‘@‘%‘ IDENTIFIED BY ‘some_pass‘; GRANT ALL PRIVILEGES ON *.* TO ‘finley‘@‘%‘ WITH GRANT OPTION;
mysql> CREATE USER ‘admin‘@‘localhost‘ IDENTIFIED BY ‘admin_pass‘;
mysql> GRANT RELOAD,PROCESS ON *.* TO ‘admin‘@‘localhost‘;
mysql> CREATE USER ‘dummy‘@‘localhost‘;
 
mysql> SHOW CREATE USER ‘admin‘@‘localhost‘\G
*************************** 1. row ***************************
CREATE USER for admin@localhost:
CREATE USER ‘admin‘@‘localhost‘ IDENTIFIED WITH ‘mysql_native_password‘ AS ‘*67ACDEBDAB923990001F0FFB017EB8ED41861105‘ REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK
 
 
DROP USER:
DROP USER ‘jeffrey‘@‘localhost‘;

【SQL篇章--基于MySQL5.7--创建用户】

标签:bsp   word   style   ring   for   ant   user   uri   sel   

原文地址:http://www.cnblogs.com/cuisi/p/6142268.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!