创建用户:
create user 用户名 identified by '密码';
授权:
grant all privileges on *.* to 用户名@localhost identified by '密码' WITH GRANT OPTION;
grant all privileges on *.* to 用户名@地址 identified by '密码' WITH GRANT OPTION;
grant all privileges on *.* to 用户名@'%' identified by '密码' WITH GRANT OPTION;
转载于:https://blog.51cto.com/jiaxiaoxu/1744386