zoukankan      html  css  js  c++  java
  • Navicat连接centos6.5报错2003和1130

    1、在w7上安装centos6.5虚拟机,通过yum安装mysql。

    2、在w7上用Navicat连接虚拟机上的mysql时报错2003:Can't connect to MySQL server (10060)

    3、需要关闭centos6.5的防火墙,有两种方式:

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

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

    4、之后用Navicat连接虚拟机上的mysql时又报错1130 host 192.168.1.100 is not allowed to connect to this MySql server

    5、在安装mysql的虚拟机登入mysql账号(楼主此处使用secureCRT登入虚拟机执行下边命令),更改 "mysql" 数据库里的 "user" 表

    里的 "host" 项,把原来的"localhost"改成"%"即可解决。

    mysql -uroot -p password

    mysql>use mysql;

    mysql>update user set host = '%' where user = 'root';

    mysql>select host, user from user;

    mysql>flush privileges或mysql>service mysqld restart生效以上设置

  • 相关阅读:
    登乐游原
    遇到Tomcat端口占用怎么办
    tensorflow cnn+rnn基本结构
    linux bash 入门
    python 装饰器
    php 后端开发学习
    图像增强方法
    git 使用
    斯坦福机器学习课程笔记
    django学习笔记
  • 原文地址:https://www.cnblogs.com/lcsvfg/p/7427784.html
Copyright © 2011-2022 走看看