首页 > 数据库技术 > 详细

Mysql限制IP访问

时间:2015-08-03 17:05:11      阅读:331      评论:0      收藏:0      [点我收藏+]

// 顯示資料庫
show databases;

// 選擇 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访问

原文:http://my.oschina.net/bobwei/blog/487114

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!