CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

The latest version of MySQL 8.0.x version is compared with the version 5.x, only a lot faster, but also brought a lot of updates and faster performance, read and write workloads, IO-intensive workloads has a more robust performance, we use utf-8mb4 as the default character set, while enhancing security.

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

1, first install rpm, the equivalent of something acceleration.

# rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm

If wrong, see the comments section below this article

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

# yum repolist all | grep mysql

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

mysql-connectors-community / x86_64 MySQL Connectors Community Enable: 118
MySQL-Connectors-Community Community-Source MySQL Connectors Community Community - Sour disable
mysql-tools-community / x86_64 MySQL Tools Community enabled: 95
MySQL-Tools-Community Community-Source MySQL Tools Community Community - Source disable
mysql-tools-preview / x86_64 MySQL Tools preview disable
mysql-tools-preview-source MySQL Tools preview - Source disable
mysql55-community / x86_64 MySQL 5.5 Community Server disabled
mysql55-community-source MySQL 5.5 Community Server - Sour disabled
mysql56- community / x86_64 MySQL 5.6 Community Server disabled
mysql56-community-source MySQL 5.6 Community Server - Sour disabled
Community Community-mysql57 / x86_64 MySQL 5.7 Community Community Server        enabled : 364
mysql57-Source-Community Community Community Community Server MySQL 5.7 - Sour disabled
mysql80-community / x86_64 MySQL 8.0 Community Server disabled
mysql80-Community Community-Source MySQL 8.0 Community Community Server - Sour disabled

As can be seen from the above, it will default download version 5.7 of MySQL database, and the 8.0 version is off by default, first disable 5.7, and 8.0 enable MySQL database.

3, open the file, modify the settings

# We /etc/yum.repos.d/mysql-community.repo

Command input code is shown below, each module represents a version of the database.

Where you can see the 5.7 version, enabled = 1, instead enabled = 0, disable the swap
Also you can see version 8.0, enabled = 0, change enabled = 1, open

[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.5
[mysql55-community]
name=MySQL 5.5 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=http://repo.mysql.com/yum/mysql-8.0-community/el/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

[mysql-tools-preview]
name=MySQL Tools Preview
baseurl=http://repo.mysql.com/yum/mysql-tools-preview/el/7/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

4. After modifying MySQL version can be used to view

# yum repolist enabled | grep mysql

mysql-connectors-community/x86_64 MySQL Connectors Community                118
mysql-tools-community/x86_64      MySQL Tools Community                      95
mysql80-community/x86_64          MySQL 8.0 Community Server                129

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

5, see after MySQL version 8.0, you can officially start the installation of MySQL.

# yum install -y mysql-community-server

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

6, after the completion of start MySQL

# systemctl start mysqld

7, see the MySQL start state

# systemctl status mysqld

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

8, after the installation is complete MySQL will generate a temporary password by default in the LOG file (/var/log/mysqld.log) may be modified (after the colon is the old password) according to their actual situation.

2019-08-24T05:32:58.277335Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.17) initializing of server in progress as process 58121
2019-08-24T05:33:04.727785Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: jb_klPPYe12W
2019-08-24T05:33:06.400398Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.17) initializing of server has completed
2019-08-24T05:33:09.808077Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.17) starting as process 58170
2019-08-24T05:33:12.378185Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2019-08-24T05:33:12.428422Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.17'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.
2019-08-24T05:33:12.522176Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: '/var/run/mysqld/mysqlx.sock' bind-address: '::' port: 33060

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

 

9, log in and modify MySQL root password

mysql -uroot -p

mysql>ALTER USER 'root'@'localhost' IDENTIFIED BY 'Linuxidc.com@123';

CentOS 7.6 under yum install MySQL 8.0 version of the graphic tutorials

Linuxidc.com@123 here for the new password.

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160316.htm