yum install mysql mysql-server
service mysqld start /usr/bin/mysql_secure_installation
The MySQL Secure Installation process will walk you through initial security changes that should be put into place for your new MySQL instance.
Note: Chose a secure password and limit root access to localhost only.
Edit the /etc/my.cf file to match the following, limiting the server only to listen to local connections:
[mysqld] bind-address = 127.0.0.1 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
We’re going to restart all services at the end, so let’s move on.
No comments:
Post a Comment