Overview
To install MySQL 8, you can use the standard yum installation:
Install MySQL 8
[root@mysql-cluster-b ~]# yum install mysql-community-server Loaded plugins: langpacks, ulninfo Resolving Dependencies --> Running transaction check ---> Package mysql-community-server.x86_64 0:8.0.37-1.el7 will be installed --> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.37-1.el7.x86_64 --> Running transaction check ---> Package mysql-community-client.x86_64 0:8.0.37-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved =========================================================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================================================== Installing: mysql-community-server x86_64 8.0.37-1.el7 ol7_MySQL80 65 M Installing for dependencies: mysql-community-client x86_64 8.0.37-1.el7 ol7_MySQL80 16 M Transaction Summary =========================================================================================================================================================================== Install 1 Package (+1 Dependent package) Total download size: 81 M Installed size: 375 M Is this ok [y/d/N]: y Downloading packages: (1/2): mysql-community-client-8.0.37-1.el7.x86_64.rpm | 16 MB 00:00:00 (2/2): mysql-community-server-8.0.37-1.el7.x86_64.rpm | 65 MB 00:00:00 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Total 86 MB/s | 81 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : mysql-community-client-8.0.37-1.el7.x86_64 1/2 Installing : mysql-community-server-8.0.37-1.el7.x86_64 2/2 Verifying : mysql-community-client-8.0.37-1.el7.x86_64 1/2 Verifying : mysql-community-server-8.0.37-1.el7.x86_64 2/2 Installed: mysql-community-server.x86_64 0:8.0.37-1.el7 Dependency Installed: mysql-community-client.x86_64 0:8.0.37-1.el7 Complete!
Start
Once we have it installed we can start it as follows:
Start MySQL
[root@mysql-cluster-b ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service [root@mysql-cluster-b ~]# temporal_password=`awk '/A temporary password is generated for/ {a=$0} END{ print a }' /var/log/mysqld.log | awk '{print $(NF)}'` [root@mysql-cluster-b ~]#