mysql 远程登录
mysql -u root -p
user mysql
mysql> select host, user from user;
+———–+——+
| host | user |
+———–+——+
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+———–+——+grant all on . to ‘root’@’%’ identified by ‘root’ with grant option;
mysql> select host, user from user;
+———–+——+
| host | user |
+———–+——+
| % | root |
| 127.0.0.1 | root |
| ::1 | root |
| localhost | root |
+———–+——+