• 使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)


    使用图形界面管理工具Navicat for MySQL连接Mysql数据库时提示错误:Can't connect to MySQL server (10060)

    问题原因:

    导致些问题可能有以下几个原因:

    1、网络不通;

    2、服务未启动;

    3、防火墙端口未开放;

    解决方法:

    启动服务:

    [plain] view plain copy
     
    1. service mysqld start;  

    经过分析,我遇到的这个问题是防火墙导致的!

    开放防火墙端口
    添加需要监听的端口
    /sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT

    保存设置
    /etc/init.d/iptables save

    查看状态
    /etc/init.d/iptables status

    临时关闭防火墙服务
    service iptables stop

    开启防火墙服务
    service iptables start

    开机不再启动防火墙服务
    chkconfig iptables off

    注意:
    此文档适用服务器环境为:CentOS 6.5  MySQL 5.6

  • 相关阅读:
    [leetcode-91-Decode Ways]
    [leetcode-72-Edit Distance]
    [leetcode-67-Add Binary]
    [leetcode-137-Single Number II]
    [leetcode-60-Permutation Sequence]
    [leetcode-55-Jump Game]
    [leetcode-18-4Sum]
    [leetcode-15-3Sum]
    [leetcode-47-Permutations II]
    easyui tabs update 强制刷新页面
  • 原文地址:https://www.cnblogs.com/javaboy2018/p/8687176.html
Copyright © 2020-2023  润新知