数据库
首页 > 数据库> > mysql 远程访问

mysql 远程访问

作者:互联网

mysql 远程访问 mysql -hlocalhost -uroot -proot mysql> use mysql Database changed mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Query OK, 0 rows affected (0.01 sec)   mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.01 sec)   mysql> SELECT HOST,USER FROM USER; +-----------+------+ | HOST | USER | +-----------+------+ | % | root | | 127.0.0.1 | root | | ::1 | root | | localhost | root | +-----------+------+ 4 rows in set (0.00 sec)   mysql>

标签:GRANT,+-----------+------+,访问,sec,USER,mysql,root,远程
来源: https://www.cnblogs.com/xiondun/p/16304214.html