Categories
MySql

Mysql Open remote access

Connect

mysql -u root -p
USE mysql;
SELECT user,host FROM user;

grant privileges

from specific IP

GRANT ALL PRIVILEGES ON *.* TO root@my_ip IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

From everywhere

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY ‘root_password‘ WITH GRANT OPTION;

Flush privileges

FLUSH PRIVILEGES;

Leave a Reply