这两个之间有什么区别吗?
grant usage on databasename.* to 'username'@'localhost' identified by 'password'
并且。
grant usage on *.* to 'username'@'localhost' identified by 'password'
并且。
create user 'username'@'localhost' identified by 'password'
假设用户不存在?我的理解是每个语句都会创建一个带有密码的用户,并且不授予用户任何权限。
如果用户已经存在,则我期望会有一些不同:
grant
语句将更改密码为“password”create user
语句将失败并显示错误信息