Mysql 创建用户与授权
1. 创建用户:
CREATE USER ‘username’@’host’ [IDENTIFIED BY ‘password’];
username:要创建的用户名;
host:代表地址;任何地址可以使用%
IDENTIFIED BY ‘password’:设置密码,如果不写则为空密码
eg:
CREATE USER 'root'@'localhost' IDENTIFIED BY '123';
CREATE USER 'root'@'%' IDENTIFIED BY '123';