zoukankan      html  css  js  c++  java
  • Linux CentOS7下 mysql5.6远程连接Navicat

    使用Navicat工具,进行远程授权登录

    一、使用root用户登录到mysql

    mysql -u root -p

     

     

     查询数据库 show databases;

     

     

     使用mysql数据库(真正的数据库,而非数据库软件),将所有数据库的所有表(*.*)的所有权限(all privileges),授予通过任何ip(%)访问的root用户,密码为为你自己设置的密码,执行下面的命令,最后刷新(flush privileges)即可。刷新之后重启mysql

    use  mysql;

    grant all privileges on *.* to 'root'@'%' identified by '你自己设置的密码' with grant option; flush privileges;

      service mysqld restart

    开放防火墙端口:

    开启防火墙:

    启动: systemctl start firewalld
    查看状态: systemctl status firewalld 
    禁用,禁止开机启动: systemctl disable firewalld
    停止运行: systemctl stop firewalld

    开放防火墙端口3306:

    firewall-cmd --zone=public --add-port=3306/tcp --permanent

    重新载入:

    firewall-cmd --reload

    查看所有打开的端口:

    firewall-cmd --zone=public --list-ports

     

     再去Navicat远程连接mysql

    就会发现连接成功

     

     

     

     

     

     

     

     

  • 相关阅读:
    子序列自动机
    poj 暴力水题
    小白贪心题
    组合数+费马大/小定理
    随机数法
    vector的二维用法+前缀和
    巨思维题
    思维水题
    Codeforces Round #323 (Div. 2) D.Once Again... (nlogn LIS)
    Codeforces Round #325 (Div. 2) D. Phillip and Trains (BFS)
  • 原文地址:https://www.cnblogs.com/wdyjt/p/14163226.html
Copyright © 2011-2022 走看看