mysql创建用户并授权


0. 创建用户

1
create user dbuser identified by 'password';

1. 给用户授权

1
2
3
grant all privileges on *.* to dbuser@'%' identified by 'password';
# 刷新授权
flush privileges;