linux下安裝了mysql的server端和client端,通過(guò)client端進(jìn)入mysql>>可以設置遠程mysql的專(zhuān)用賬號。并打開(kāi)防火墻的mysql端口即可。
具體的命令如下:
1.mysql>>
#添加一個(gè)遠程mysql賬號,以下指telnetAccount賬戶(hù)在任何host對所有庫有權限,密碼為password
grant all privileges on *.* to 'telnetAccount'@'%' identified by 'password' with grant option;
mysql>>flush privileges;
2.打開(kāi)iptables的3306端口
修改/etc/sysconfig/iptables 文件,添加以下內容:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
不要加錯位置,跟其它state放一起
重啟iptables:
/etc/rc.d/init.d/iptables restart
遠程客戶(hù)端(windows系統) 我用sqlyog連接,測試連接,成功-o-
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/