------创建数据库(略)------------ ---------创建用户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;
时间: 2024-10-03 07:35:32