Enable remote MySQL access (root non-local access)
Often one of the first tasks after setting up a MySQL server is to enable connections from other IP addresses. Here are a some articles that discuss how to setup a user that can access a MySQL database remotely (non-locally). Between the two of them you will have all the info you need to create user accounts for remote MySQL db access 🙂
If you are in a testing environment you can also enable non-local root access for all databases from all addresses. However, for a production environment you will likely want specific users for specific DBs and limit the IPs (either specifically or by range).
Example MySQL statement to grant all privileges (except GRANT OPTION) to root:
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘somepassword’;
Grant all including grant option:
GRANT ALL ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘somepassword’;
And a more fine-grained example from the previous links in this article:
GRANT ALL ON foo.* TO bar@’202.54.10.20′ IDENTIFIED BY ‘PASSWORD’;
🙂
[END]