CentOS Linux 5/6 Install Mysql Database Server
To install MySQL server on CentOS 5/6, follow these steps:
- Add the MySQL repository:
wget https://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpmrnsudo yum localinstall mysql57-community-release-el6-9.noarch.rpm- Install the MySQL server:
sudo yum install mysql-server- Start the MySQL service:
sudo service mysqld start- Set the root password:
mysqladmin -u root password 'new_password'Replace new_password with the desired password for the MySQL root user.
- Enable automatic startup on boot:
sudo chkconfig mysqld onThe MySQL server should now be installed and running on your CentOS system. You can connect to the server and start using it by running the following command:
mysql -u root -pYou will be prompted for the root password you set in step 4.
