yum search mysql-community
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
================================================================ N/S matched: mysql-community ================================================================
mysql-community-client.x86_64 : MySQL database client applications and tools
mysql-community-common.x86_64 : MySQL database common files for server and client libs
mysql-community-libs.x86_64 : Shared libraries for MySQL database client applications
mysql-community-libs-compat.x86_64 : Shared compat libraries for MySQL 5.6.37 database client applications
mysql-community-server.x86_64 : A very fast and reliable SQL database server
yum install mysql-community-server
grep 'temporary password' /var/log/mysqld.log
2017-12-20T02:45:04.167801Z 1 [Note] A temporary password is generated for root@localhost: opz)jE+3i6d. (生成的密码有点复杂)
mysql -uroot -p , 输入黑体部分的密码
mysql> alter user 'root'@'localhost' identified by 'new password'