mysql8.0.30的RPM包安裝方法

hunterjoy發表於2022-09-22

                                   mysql8.0.30的RPM包安裝方法

1、RPM包的安裝順序如下:

rpm -ivh mysql-community-client-plugins-8.0.30-1.el7.x86_64.rpm

rpm -ivh mysql-community-common-8.0.30-1.el7.x86_64.rpm

yum remove mysql-libs

rpm -ivh mysql-community-libs-8.0.30-1.el7.x86_64.rpm

rpm -ivh mysql-community-client-8.0.30-1.el7.x86_64.rpm

yum install openssl-libs

rpm -ivh mysql-community-icu-data-files-8.0.30-1.el7.x86_64.rpm

rpm -ivh mysql-community-server-8.0.30-1.el7.x86_64.rpm


2、啟動

systemctl start mysqld


3、檢視初始密碼

 more /var/log/mysqld.log

2022-09-22T03:52:03.704142Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.30) initializing of server in progress as process 44791

2022-09-22T03:52:03.713380Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2022-09-22T03:52:04.736016Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2022-09-22T03:52:05.733605Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: .O/axplLr9ei

2022-09-22T03:52:07.978819Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 44838

2022-09-22T03:52:07.997204Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.

2022-09-22T03:52:08.612731Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.

2022-09-22T03:52:09.088371Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.

2022-09-22T03:52:09.088421Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.

2022-09-22T03:52:09.122718Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server

 - GPL.

2022-09-22T03:52:09.123749Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock


4、登入並修改初始密碼

 mysql -uroot -p'.O/axplLr9ei'

mysql: [Warning] Using a password on the command line interface can be insecure.

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 8

Server version: 8.0.30

mysql> alter user root@localhost identified by 'xy_WQ123#';

Query OK, 0 rows affected (0.01 sec)



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/543979/viewspace-2915753/,如需轉載,請註明出處,否則將追究法律責任。

相關文章