在用mysql进行远程连接时出现下列错误
[root@openfire~]#mysql-uroot--p
Enterpassword:
ERROR1130(HY000):Host'192.168.0.15'isnotallowedtoconnecttothisMySQLserver
解决方法:
[root@mysql~]#mysql-uroot-p
Enterpassword:
mandsendwith;or\g.
YourMySQLconnectionidis10
Serverversion:5.1.71Sourcedistribution
Copyright(c)2000,,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/orits
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.
mysql>GRANTALLPRIVILEGESONopenfire.*TO'root'@'192.168.0.15'IDENTIFIEDBY'redhat'WITHGRANTOPTION;
QueryOK,0rowsaffected(0.00sec)
mysql>flushprivileges;
QueryOK,0rowsaffected(0.00sec)
再次进行登录测试
[root@openfire~]#mysql-uroot--p
Enterpassword:
mandsendwith;or\g.
YourMySQLconnectionidis22
Serverversion:5.1.71Sourcedistribution
Copyright(c)2000,,Oracleand/oritsaffiliates.Allrightsreserved.
OracleisaregisteredtrademarkofOracleCorporationand/orits
affiliates.Othernamesmaybetrademarksoftheirrespective
owners.
Type'help;'or'\h'forhelp.Type'\c'toclearthecurrentinputstatement.
mysql>exitBye问题解决