Sharing insights on tech, life, food, education, and personal experiences.

Enable and Allow Remote Access to MySQL Server

By default your MySQL Server has default configuration to allow only local connection. So if your application connects MySQL in localhost, then the basic configuration can be left untouched.

If you are planning to allow and enable remote access to MySQL server, then follow the steps below :

Find the MySQL configuration file which mostly is located at /etc/my.cnf. Using a shell editor like vim or nano, find the following line and comment it

bind-address = x.x.x.x (x.x.x.x points to the ip address you wanted to access from remotely, incase multiple servers, just comment it like below)

#bind-address = x.x.x.x

Also for people using old MySQL server, make sure you also comment the following line

# skip-networking

Restart your MySQL server

service mysqld restart

and try to connect your application with database present in remote server.
Note: You also need to give GRANT access to the db user on that particular DB.


Comments

One response to “Enable and Allow Remote Access to MySQL Server”

  1. PrasantaShee avatar
    PrasantaShee

    Above steps seems to be too technical. Instead, I would recommend using tools like logmein, R-HUB remote support servers, teamviewer etc. They work well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.