Mysql开启远程连接

mysql> use mysql;
Database changed
mysql>GRANT ALL PRIVILEGES ON . TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql>exit
[root@VM_0_2_centos tomcat]# service mysqld restart

你可能感兴趣的:(Mysql开启远程连接)