This occurs because the CentOS using mariadb-server mysql-server instead of out, so if you want to use the mysql-server need to update the address of the warehouse, use the following command:
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
And then perform the installation command:
yum install mysql-server
This process will take a little time, you need to download a lot of files, there will be time to ask, if the problem does not appear, enter y to confirm
After the installation is complete, start the server:
sudo systemctl start mysqld
Next up will be able to login to the database:
-u root -p MySQL (using a password, Enter password is required)
Since the first login password no password can not set, that is, remove -p
reset Password:
After logging in, enter the command: the SET password for the user name @localhost = password ( ' your password ');