|
/Admin/databases/MySQL:
Enabling Remote Connections to a MySQL Database
This is not straight-forward, and thanks to this post[1] for getting me pointed in the right direction.
Firewall: open port 3306.
Configuration: ensure both of
are commented out in /etc/mysql/my.cnf. These are security options meant to confine MySQL server access to the local machine only.
Grant Access: MySQL has one more layer of security: access to a specific database can be explicitly granted to a specific user at a specific IP (host). There are, of course, wild cards that permit making the access wide-open, but why not be secure:
GRANT ALL privileges ON databasename.* TO username@'123.119.49.127' IDENTIFIED BY 'password';
This command appears to create username, or modify an existing username.
[1] http://ubuntuforums.org/showthread.php?t=608435
posted at: 08:14 | path: /Admin/databases/MySQL | permanent link to this entry