zoukankan      html  css  js  c++  java
  • 解决navicat连接不上mysql服务器

    1. 设置mysql密码

      如果mysql用户密码为空,需要设置后第三方mysql操作工具才可以连接

            进入数据库:mysql -uroot -p

    use mysql;
    update user set password=passworD("123456") where user='root';
    ​flush privileges;
    

      

        ​    ​到此完成密码的设置,退出后可以用新密码登录

        ​    ​mysql -uroot -p123456

        ​

        ​2.解决连接error:1130问题
        ​刚安装的mysql,ip地址只能够为127.0.0.1 或者localhost

        ​mysql -uroot -h127.0.0.1 -p    ​  这样可以访问  

        ​mysql -uroot -h192.168.3.134 -p123456 这样不可以访问

        ​提示错误:Warning: Using a password on the command line interface can be insecure.

        ​ERROR 1130 (HY000): Host '192.168.3.134' is not allowed to connect to this MySQL server

        ​解决方法:

        ​一、进入mysql

        ​二、use mysql;

        ​三、设置root账号密码为123456可以访问用ip 192.168.3.134访问mysql服务器

    ​       ​

     ​GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.3.134' IDENTIFIED BY '123456' WITH GRANT OPTION; 
    

      

        ​再次尝试:

        ​mysql -uroot -h192.168.3.134 -p123456
        ​进入mysql服务器

  • 相关阅读:
    成都磨子桥技工学校 / 数据结构 Challenge 4
    圆桌问题(网络流24题)
    试题库问题(网络流24题)
    [AHOI2005]航线规划
    [AMPPZ2014]The Prices
    方格取数(网络流24题)
    太空飞行计划问题(网络流24题)
    Linux 学习3
    Linux 学习2
    Linux 学习1
  • 原文地址:https://www.cnblogs.com/lisqiong/p/5893424.html
Copyright © 2011-2022 走看看