wget http://dev.mysql.com/get/mysql57-community-release-el6-9.noarch.rpm
rpm -ivh mysql57-community-release-el6-9.noarch.rpm
yum install -y mysql-community-client mysql-community-server
vim /etc/my.cnf
character_set_server=utf8
init_connect='SET NAMES utf8'
service mysqld start
cat /var/log/mysqld.log | grep "temporary password"
2018-01-19T08:38:40.754782Z 1 [Note] A temporary password is generated for root@localhost: A,F3!OPqKow5
mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.21
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql> alter user 'root'@'localhost' identified by '123456';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements