--mysql8.0
创建用户
mysql> create user 'username'@'%' identified with mysql_native_password by 'password';
授权
mysql> grant all on *.* to 'username'@'%';
参考:
https://www.jianshu.com/p/d7b9c468f20d
http://binary-space.iteye.com/blog/2412769