Accessing MySQL databases from remote computer

Author: | Categories: Database, Linux No Comments

To expose MySQL other than localhost uncomment following line in
and assign to your computers IP address and not loopback

bind-address =
# replace xxx with IP

Next for a remote user to connect with the correct privileges you need to have that user created in both the localhost and '%' as in.

CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypass';


GRANT ALL ON *.* TO 'myuser'@'localhost';
GRANT ALL ON *.* TO 'myuser'@'%';

Leave a Reply

Your email address will not be published.