This note is written as I was working on machine X running Scientific Linux 6.0 or above
a ) Install MySQL on server X
b) Modify /etc/my.cnf to include the following configuration under mysqld
group
in which 130.238.9.xxxx is IP address of X
c) Start MySQL server
Notes:
-
Stop by sudo /etc/init.d/mysqld
-
Status by sudo mysqladmin status
-
Don’t want to change my.cnf you can sudo /etc/init.d mysqld bind-address=130.238.xxxx
d) Open another SSH connect to X and test
Make sure that you can login
e) When you are in MySQL, run the following scripts to create a new database, a new user, and to grant the usage, privileges to the just created user
f) Make sure that the scripts you ran affected the database
With root login, you can run and observe that fact
g) Now it is time to open a new rule in your iptables ( Firewall configuration)
Allow only connection from your local machine.
h) Now open a terminal and test the result
That’s all !
I can run two instances of MySQL server
a) mysql -u regress -p regress
b) mysql -u regress -P 3310 –protocol=tcp -p regress
in which 3310 is a port number on which another MySQL is listening for incoming requests