时间:2021-07-01 10:21:17 帮助过:50人阅读
// 選擇 mysql db
use mysql;
// 顯示 user 權限
show grants for username;
// 開啟mysql db 連線的ip
grant all on dbname.* to ‘username’@‘localhost’ identified by ‘password’;
grant all on dbname.* to ‘username’@‘ip’ identified by ‘password’;
// 顯示目前帳戶@ip 資訊
show grants for username@ip;
// 更新權限
flush privileges;
Mysql限制IP访问
标签: