Accessing MySQL databases from remote computer
Author: Rizwan Ansari | 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 = xxx.xxx.xxx.xxx # 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'@'%';