一、創建用戶
root 用戶登陸,切換到mysql 數據庫:
create user 'test'@"%" identified by 'test123';
create user 'test'@‘localhost' identified by 'test123';
create user 'qa'@'localhost' identified by 'qa123456';
二、授予權限
grant all privileges on *.* to test@‘%’;
grant all privileges on *.* to test@‘localhost’;
grant all privileges on *.* to qa@'localhost';
三、刷新權限
flush privileges;
四、修改用戶密碼
切換到mysql 數據庫: use mysql;
update user set password=password("cx_qa123456") where user="cx_test";
flush privileges;