mysql开启远程访问
Posted 夏冬青
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql开启远程访问相关的知识,希望对你有一定的参考价值。
mysql> use mysql;
Database changed
mysql> grant all privileges on *.* to root@‘%‘ identified by "password";
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> select host,user,password from user;
+--------------+------+-------------------------------------------+
| host | user | password |
+--------------+------+-------------------------------------------+
| localhost | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
| 192.168.1.1 | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
| % | root | *A731AEBFB621E354CD41BAF207D884A609E81F5E |
+--------------+------+-------------------------------------------+
3 rows in set (0.00 sec)
以上是关于mysql开启远程访问的主要内容,如果未能解决你的问题,请参考以下文章