CentOS 7 does not have a MySQL database, the default database is MARIADB (a branch of MySQL).
You can install the MySQL database manually by following these steps.
1. Download RPM installation files
wget http://repo.mysql.com/mysql-community-release-el7.rpm
2. Perform RPM installation
RPM-IVH mysql-community-release-el7.rpm
After the dependency resolution is complete, the following options appear:
1 Dependencies resolved2 3=============================================================================================================== ======================================================================================================4 Package Arch Vers Ion Repository Size5=============================================================================================================== ======================================================================================================6 Installing:7Mysql-community-libs x86_645.6. +-2. EL7 mysql56-community2.0M8Replacing mariadb-libs.x86_641:5.5. --1. El7_29Mysql-community-server x86_645.6. +-2. EL7 mysql56-community -MTenInstalling fordependencies: OneMysql-community-client x86_645.6. +-2. EL7 mysql56-community +M AMysql-community-common x86_645.6. +-2. EL7 mysql56-community thek -PERL-COMPRESS-RAW-BZIP2 x86_642.061-3. el7Base +k -Perl-compress-raw-zlib x86_641:2.061-4. el7Base $k thePERL-DBI x86_641.627-4. el7Base 802k -Perl-io-compress Noarch2.061-2. el7Base 260k -Perl-net-daemon Noarch0.48-5. el7Base Wuyik -Perl-plrpc Noarch0.2020- -. el7Base $k + - Transaction Summary +=============================================================================================================== ======================================================================================================== AInstall2Packages (+8Dependent packages) at -Total Download Size: theM -Is ThisOK [y/d/n]:
3. As you can see, both the server and client are selected for installation. Select Y to download the installation automatically.
4. When the installation is complete, start MySQL.
Systemctl Start Mysqld.service
5. Set the root password.
Update user set Password=password ("123456") where user= ' root ';
6. Boot from BOOT.
1 vim/etc/rc.local2 Add service mysqld start
CentOS 7 install MySQL and set up boot from