1.创建数据库
create database test;
2.远程连接数据库时报错:
The specified user/password combination is rejected:
[28000][1045] Access denied for user 'test'@'%' (using password: YES)
创建完数据库后,用户需要授权.
3.授权命令
grant all on test.* to 'test'@'%' identified by '123456' with grant option;
第一个test是数据库名,第二个test是账户名,123456是密码.