How to bind my mysql server to a specific IP address
MySQL server contains a file my.cnf in /etc direcory of Linux. This file contains configuration of MySQL server as well as the configuration parameters of the MySQL client.
To make MySQL server listen on a specific IP address, you need to add a line similar to the following with IP address of your choice under mysqld section.
[root@techpulp ~]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 # To allow mysqld to connect to a MySQL Cluster management daemon, uncomment # these lines and adjust the connectstring as needed. #ndbcluster #ndb-connectstring="nodeid=4;host=localhost:1186" bind-address=127.0.0.1 ... [root@techpulp ~]#
In my case, I configured MySQL service to bind to local host (i.e IP address 127.0.0.1). Change the highlighed line above with your own IP address.

