首页 > 数据库技术 > 详细

centos7安装mysql8

时间:2020-04-12 18:39:41      阅读:51      评论:0      收藏:0      [点我收藏+]

安装mysql前要先删除本机安装的mariadb

检查已经安装的mariadb列表

[root@iZ1i4qd6oynml0Z ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.52-1.el7.x86_64

然后执行删除

[root@iZ1i4qd6oynml0Z ~]# rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64

下面开始安装mysql

更新yum源

yum update

下载mysql yum包

wget https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

安装软件源

rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm

安装mysql,后面的一直输入y就好了

yum install mysql-community-server

启动mysql

service mysqld start

查看MySQL运行状态

service mysqld status

查看mysql默认密码,最后那一串就是默认的密码

grep ‘temporary password‘ /var/log/mysqld.log

登录mysql,输入上面步骤得到的默认密码

[root@iZ1i4qd6oynml0Z ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.19

Copyright (c) 2000, 2020, 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> 

centos7安装mysql8

原文:https://www.cnblogs.com/wstong/p/12686174.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!