终端登录MySQL:
mysql -uroot -p
创建远程用户并赋予操作某个数据库的权限:
grant all privileges on newdb.* to 'newuser'@'%' identified by 'newpassword' with grant option;
myslq> flush privileges;
创建新的MySQL用户:
create user test identified by '123456';
查看所有MySQL用户:
select host, user from mysql.user;
如仍然无法远程连接,打开mysql文件,注释掉如下部分:
bind-address = 127.0.0.1
网友评论