Navicat Lite不能访问mysql

上一篇 / 下一篇  2013-09-22 16:21:53 / 个人分类:linux

Navicat Lite不能访问mysql
解决办法如下:
1.首先查看防火墙是否关闭
2.防火墙关闭后,还不能访问时,则如下解决:
 
想都不用想,肯定是Mysql的访问权限问题。
 
首先,通过终端(我用的是SSH)远程登录到Linux服务器,为了安全起见,先改一下Mysql数据的root用户密码:
 
1
2
3
4
5
6
7
8
9
10
11
[plain]
[hadoop@h1 ~]$ mysqladmin -u rootpassword123456 
[hadoop@h1 ~]$ mysql -uroot -p 
Enterpassword
Welcometothe MySQL monitor.  Commandsendwith;or\g. 
Your MySQLconnectionidis13 
Server version: 5.0.77 Source distribution 
   
Type'help;'or'\h'forhelp. Type'\c'toclear the buffer. 
   
mysql>
  
第二步,查询Mysql中所有用户的权限:
 
 
意料之中,mysql的root用户只能通过本机访问,下面我们来改一下权限:
 
1
2
3
[plain]
mysql>update`user`set`host` ='%'where`user` ='root'
mysql> flushprivileges;

 

 
测试一下,如图:
 
 
操作成功,现在,你可以通过终端远程管理mysql数据库了。


TAG: Navicat Lite

 

评分:0

我来说两句

Open Toolbar