mysql8.0部署

mysql8.0部署


1、通过 rpm -qa | grep mariadb 命令查看 mariadb 的安装包

rpm -e mariadb-libs-x.x.xx-x.xxx.x86_64 --nodeps

2、删除系统自带的mysql及其依赖(防止冲突)
2、删除系统自带的mysql及其依赖(防止冲突)

2、给CentOS添加rpm源,并且选择较新的源

wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
rpm -ivh mysql80-community-release-el8-1.noarch.rpm --force --nodeps 
yum makecache

在这里插入图片描述

[root@host-193-168-195-19 ~]# yum list | grep mysql-com
mysql-community-client.x86_64                         8.0.27-1.el8                           @mysql80-community        
mysql-community-client-plugins.x86_64                 8.0.27-1.el8                           @mysql80-community        
mysql-community-common.x86_64                         8.0.27-1.el8                           @mysql80-community        
mysql-community-libs.x86_64                           8.0.27-1.el8                           @mysql80-community        
mysql-community-server.x86_64                         8.0.27-1.el8
[root@host-193-168-195-19 ~]# yum  install mysql-community-server.x86_64

在这里插入图片描述

[root@host-193-168-195-19 ~]# cd /var/lib/mysql
[root@host-193-168-195-19 mysql]# systemctl start mysqld   
[root@host-193-168-195-19 mysql]# ls
 auto.cnf        client-cert.pem      ibdata1         mysql                private_key.pem   undo_001
 binlog.000001   client-key.pem       ib_logfile0     mysql.ibd            public_key.pem    undo_002
 binlog.index   '#ib_16384_0.dblwr'   ib_logfile1     mysql.sock           server-cert.pem
 ca-key.pem     '#ib_16384_1.dblwr'   ibtmp1          mysql.sock.lock      server-key.pem
 ca.pem          ib_buffer_pool      '#innodb_temp'   performance_schema   sys
 [root@host-193-168-195-19 mysql]#  grep "password" /var/log/mysqld.log  #查看临时密码
 2021-10-22T06:52:51.562210Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost:    #mysql2
 [root@host-193-168-195-18 ~]# grep "password" /var/log/mysqld.log
2021-10-22T07:41:16.645357Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost:   #mysql1
[root@host-193-168-195-18 ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.27

Copyright (c) 2000, 2021, Oracle and/or its affiliates.

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>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值