This recipe shows you how to perform a basic installation of the popular MySQL database server on CentOS. MySQL is the second most widely used database system today, which is found across many different industries providing data storage for everything from dynamic websites to large-scale data warehouses.
This recipe requires a CentOS system with a working network connection and administrative privileges either using the root
account or sudo
.
Follow these steps to install MySQL and create a new database:
Download the repository configuration package for the Oracle-maintained MySQL repository:
curl -LO dev.mysql.com/get/mysql57-community-release-el7- 7.noarch.rpm
Install the downloaded package:
yum install mysql57-community-release-el7-7.noarch.rpm
Now that the MySQL repository is registered, install the
mysql-community-server
package:yum install mysql-community-server
Start the MySQL server and enable it to start automatically...