如果有报错
error: Failed dependencies:
perl(JSON) is needed by mysql-community-test-8.0.15-1.el7.x86_64
解决方案:
yum install perl.x86_64 perl-devel.x86_64 -y
yum install perl-JSON.noarch -y
3.2 安装非必选项(可不安装,按照顺序)
rpm -ivh mysql-community-libs-compat-8.0.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-embedded-compat-8.0.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-devel-8.0.15-1.el7.x86_64.rpm
rpm -ivh mysql-community-test-8.0.15-1.el7.x86_64.rpm
安装完成
4.启动
4.1启动mysql
sevice mysqld start
5.设置密码
不修改密码登录后是不能操作的
例如:
mysql> use mysql
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
修改密码有两种方式
1.利用生成的出手四化密码登录,然后修改
初始化密码在/var/log/mysqld.log
例如:
2019-05-31T02:08:01.273665Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.15) initializing of server in progress as process 91249
2019-05-31T02:08:03.665256Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: j)n,?QEJu9ju
2019-05-31T02:08:05.810755Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.15) initializing of server has completed
2019-05-31T02:08:08.600324Z 0 [Sy