終端登錄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