原文:https://blog.csdn.net/Wizard_1/article/details/111882700
CREATE USER 'qbsys'@'%' IDENTIFIED BY '123456';
grant all privileges on question_bank_system.* to 'qbsys'@'localhost' identified by '123456'; #本地授权
grant all privileges on question_bank_system.* to 'qbsys'@'%' identified by '123456'; #远程授权
flush privileges;
#刷新系统权限表
grant select,update on question_bank_system.* to 'qbsys'@'localhost' identified by '123456';
flush privileges; #刷新系统权限表
SELECT user FROM mysql.user;
# 修改用户密码
set password for 'qbsys'@'%' = password('youpassword');
set password for 'qbsys'@'localhost' = password('youpassword');