MySQL5.7安装
- 安装rpm包环境
[root@harbor02#>> ~]#wget http://repo.mysql.com/mysql57-community-release-el7.rpm
[root@harbor02#>> ~]#rpm -ivh mysql57-community-release-el7.rpm
- 安装MySQL5.7
[root@harbor02#>> ~]#yum install mysql-community-server.x86_64
- 启动
[root@harbor02#>> ~]#systemctl start mysqld.service
- 查找登录密码
[root@harbor02#>> ~]#cat /var/log/mysqld.log |grep password
2018-09-14T17:02:01.956752Z 1 [Note] A temporary password is generated for root@localhost: dMF!iOrrF2i;
- 登录
[root@harbor02#>> ~]#mysql -h 127.0.0.1 -uroot -p
- 修改密码
mysql> set password for root@localhost = password('A_bc123789456');
Query OK, 0 rows affected, 1 warning (0.00 sec)