Linux serverlinux web serverNETWORK ADMINISTRATIONS

MySQL | Remote Access | MySQL Server | Linux CentOS 6.3 Part 1 // Tips from a Self Taught Developer

In this tutorial the self-taught developer talks you through installing and configuring a MySQL server to allow remote access on Linux using CentOS 6.3.

So first, download and install the MySQL server: yum install MySQL MySQL-server

Next make it so as the MySQL server with be running on server startup, issue the following command:

chkconfig mysqld on

Next start the mysqld service

service mysqld start

Next, run the command /usr/bin/mysql_secure_installation in order to set the root password and to delete other users and ultimately to stop the root user from having remote access.

Then you can access the MySQL server, to make a new user, which you can login in as rather than using the root user all of the time.

We then edited the /etc/my.cnf, to allow the server to be accessed remotely only on the address of 10.10.10.30, which was the static IP address of this machine which we install the MySQL server on.

We add the following line to this file below the area which is [mysqld]
bind-address=10.10.10.30

Note: this IP address needs to be the static IP address of this single machine.

Next, we added a rule to the firewall by editing the /etc/sysconfig/iptables file, by adding the following line to it, above the ssh line:

-A INPUT -p tcp -m state –state NEW,ESTABLISHED -m tcp –dport 3306 -j ACCEPT

Once you have saved and close this file, restart or reload the iptables:

service iptables restart

Potentially, this is the server ready to be used remotely, although you are still required to add a user which has the correct privileges:

No more space available…best just watch the video!!!!

#davidsvideos #SelfTaughtDeveloper #DavidThorn

source

by Davids Videos

linux web server

Leave a Reply

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