Navicat 如何设置正常连接Linux下的mysql

1.查看防火墙状态,如果开启了,则将其关闭。

查看防火墙:

[root@localhost ~]# service iptables status

关闭防火墙:

[root@localhost ~]# service iptables stop

永久关闭防火墙:

chkconfig iptables off

开启:

chkconfig iptables on
2.重启系统

reboot

3.启动mysql服务

[root@localhost ~]# service mysqld start

============================

设置开机启动msql服务:

查看状态:

[root@localhost ~]# chkconfig --list

mysqld 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭

如果看到mysql的服务,并且3,4,5都是on的话则成功,如果是off,则键入

[root@localhost ~]# chkconfig --level 345 mysqld on

成功状态:

[root@localhost ~]# chkconfig --list

mysqld 0:关闭 1:关闭 2:关闭 3:启用 4:启用 5:启用 6:关闭

重启(reboot)验证:

[root@localhost ~]# service mysqld status

mysqld (pid 1617) 正在运行...

 

猜你喜欢

转载自www.cnblogs.com/houzp/p/10451940.html