Computer >> Hướng Dẫn Máy Tính >  >> Lập Trình >> MySQL

Mở quyền truy cập root MySQL từ mọi host?

Để mở quyền root từ mọi host, chuyển sang database mysql bằng lệnh USE.

Cú pháp USE

USE anyDatabasename;

Thực hiện

mysql> USE mysql;
Database changed

Cập nhật host cho user root:

mysql> UPDATE user SET host='%' WHERE host='localhost';
Query OK, 6 rows affected (0.19 sec)
Rows matched: 6 Changed: 6 Warnings: 0