In this tutorial I talk 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 editted the /etc/my.cnf, to allow the server to be access 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]
Note: this ip address needs to be static ip address of this single machine.
Next we added a rule to the firewall by editting 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 save and closed 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!!!!
Xem thêm Bài Viết:
- Ưu Và Nhược Điểm Của Các Phần Mềm Quản Lý Dự Án
- Chipset B550 – Kẻ thay thế X570 với mức giá MỀM hơn rất nhiều
- Which SSD Is Better – Samsung 860 PRO vs 850 PRO SSD
- Installing Samsung Evo 860 250Gb SSD in G41 Board | Unbox, Review & how to install OS in ssd + HDD
- Samsung 860 EVO Review and Installation