Thursday 8 November 2018

Remote access to MariaDB


Edit my config file (vi /etc/mysql/my.cnf) :

Mark off line “bind-address 127.0.0.x”

Insert new line below as “bind-address 0.0.0.0”



CREATE 12 USER ‘user_remote_R_only’@‘localhost’ IDENTIFIED BY ‘myStrongeSTpassword’;

CREATE USER ‘user_remote_R_only’@’%’ IDENTIFIED BY ‘myStrongeSTpassword’;

GRANT SELECT ON *.* TO ‘user_remote_R_only’@‘localhost’;

GRANT SELECT ON *.* TO ‘user_remote_R_only’@’%’;

flush privileges;



Restart the MYSQL Server sudo service mysql restart

No comments:

Post a Comment