1. 程式人生 > >伺服器安裝mysql後配置遠端訪問許可權

伺服器安裝mysql後配置遠端訪問許可權

mysql -uroot -p;

use mysql;

#所有ip能訪問

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

#設定某個ip能訪問

GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'192.168.1.3' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;