mysql 5.7 安装

MySQL5.7安装

  1. 安装rpm包环境
[root@harbor02#>> ~]#wget http://repo.mysql.com/mysql57-community-release-el7.rpm
[root@harbor02#>> ~]#rpm -ivh mysql57-community-release-el7.rpm 
  1. 安装MySQL5.7
[root@harbor02#>> ~]#yum install mysql-community-server.x86_64 
  1. 启动
[root@harbor02#>> ~]#systemctl start mysqld.service 
  1. 查找登录密码
[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;
  1. 登录
[root@harbor02#>> ~]#mysql -h 127.0.0.1 -uroot -p
  1. 修改密码
mysql> set password for root@localhost = password('A_bc123789456');
Query OK, 0 rows affected, 1 warning (0.00 sec)
posted @ 2020-06-19 10:39  叨客厨子  阅读(129)  评论(0编辑  收藏  举报