玩轉MySQL優化命令

1、MySQL更改爲只能本地登錄
# use mysql;
# select user,host,Password from user where user='root';
# delete from user where user='root' and host='%';

2、MySQL授予外網登陸權限

grant all privileges on *.* to 授予外網登陸的用戶名@'%' identified by '密碼' WITH GRANT OPTION;

# grant all privileges on *.* to root@'%' identified by 'root' WITH GRANT OPTION;
# flush privileges;

3、更改MySQL的存儲目錄
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章