mysql设置远程连接

sudo vim /etc/mysql/mysql.conf.d/cnf

忘记密码时:

1.输入skip-grant-tables

2.  mysql> USE mysql ;
  mysql> UPDATE user SET Password = password ( ‘new-password‘ ) WHERE User = ‘root‘ ;
  mysql> flush privileges ;
  mysql> quit

3.注释掉

  bind-address           = 127.0.0.1

mysql设置远程连接

上一篇:Mysql数据库密码设置策略


下一篇:一次SQL查询优化原理分析(900W+数据,从17s到300ms)