------创建数据库(略)------------
---------创建用户mysql5.6以上用insert创建用户是有问题的--------- GRANT USAGE ON *.* TO ‘user01‘@‘localhost‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION; -----------授权------------- ----这里我创建了个Library数据库给user01----------- grant all privileges on Library.* to user01@localhost identified by ‘123456‘; ---------------退出之后登陆即可----------------
由于是5.6版本mysql,所以不能用insert的方式来创建用户。
GRANT USAGE ON *.* TO ‘user01‘@‘localhost‘ IDENTIFIED BY ‘123456‘ WITH GRANT OPTION;
【MySQL学习】-- 0x03 .sql 创建用户及其对应数据库
原文:http://www.cnblogs.com/driedfish/p/5346440.html