navicat连接linux mysql问题汇总

##连接mysql

  1. 权限问题
  2. 阿里云的规则
  3. 防火墙
  4. mysql创建用户并赋权

权限

  1. 进入mysql
  2. use mysql
  3. update user set host = ‘%’ where user = ‘root’;
  4. flush privileges;

阿里云规则

  1. 定义规则,开启3306端口

防火墙

  1. 永久性生效

开启:chkconfig iptables on

关闭:chkconfig iptables off

  1. 即时生效,重启后失效

开启:service iptables start

关闭:service iptables stop

mysql创建用户并赋权

  1. create user ‘zpc’@’%’ identified by ‘root’;
  2. grant all privileges on . to zpc@’%’ identified by ‘root’;
  3. flush privileges;

你可能感兴趣的:(mysql,navicat连接linux,mysql问题汇总)