1. First, download the corresponding database from the MySQL official website according to your machine: https://dev.mysql.com/downloads/mysql/ 2. Use xftp to upload the compressed package to a folder on the virtual machine or server, and finally decompress the MySQL compressed package to a custom directory. If you download it on Linux, skip this step (the method is not limited). 3. Uninstall the mariadb database. First check the mariadb installation package, then uninstall it, and finally check it again to confirm. The command is as follows: rpm -qa | grep mariadb rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps 4. Unzip the uploaded MySQL installation package. The decompression command format is: tar -xvf **. For example, I unzipped it to the /software/mysql directory, as shown below: tar -xvf mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar 5. Then install the options in the following list and ignore the rest:
The command is as follows: rpm -ivh mysql-community-common-8.0.26-1.el7.x86_64.rpm --nodeps –force rpm -ivh mysql-community-libs-8.0.26-1.el7.x86_64.rpm --nodeps –force rpm -ivh mysql-community-client-8.0.26-1.el7.x86_64.rpm --nodeps --force rpm -ivh mysql-community-server-8.0.26-1.el7.x86_64.rpm --nodeps --force The implementation is as follows: 6. View the installed MySQL resources rpm -qa | grep mysql 7. Enter the following command to complete the initialization and related configuration of MySQL mysqld --initialize chown mysql:mysql /var/lib/mysql -R systemctl start mysqld.service systemctl enable mysqld 8. View the initial password of the database. The command is as follows: cat /var/log/mysqld.log | grep password 9. Log in to MySQL as root user and enter the initial password mysql -u root -p 10. Change the root password, then exit to verify the password. The command is as follows: alter user "root"@"localhost" identified by 1qaz@2wsx; 11. Authorize remote access through the following command create user 'root'@'%' identified with mysql_native_password by '1qaz@2wsx'; grant all privileges on *.* to 'root'@'%' with grant option; flush privileges; -- effective immediately 12. Modify the encryption rules through the following command. The encryption rules of MySql8.0 and 5.0 are different, and the current visualization tool only supports the old encryption method. Finally, refresh the modified permissions. ALTER USER 'root'@'localhost' IDENTIFIED BY '1qaz@2wsx' PASSWORD EXPIRE NEVER; flush privileges; 13. Turn off the firewall through the following command systemctl stop firewalld.service systemctl disable firewalld.service systemctl mask firewalld.service 14. Install the iptables firewall. If "Complete!" or "Complete!" appears, it means success. The command is as follows: yum -y install iptables-services 15. Start the firewall with the following command systemctl enable iptables; systemctl start iptables; 16. Edit the firewall through the vi /etc/sysconfig/iptables command and add a port vi /etc/sysconfig/iptables
17. Restart the firewall with the following command to make the configuration take effect: systemctl restart iptables.service 18. Set the firewall to start at boot time through the command: systemctl enable iptables.service 19. Finally, use the client tool to connect and test. This is the end of this article about installing MySQL 8.0.26 on CentOS 7. For more information about installing MySQL 8.0.26 on CentOS 7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Summary of the differences between global objects in nodejs and browsers
>>: 5 cool and practical HTML tags and attributes introduction
HTML validate refers to HTML validation. It is the...
Table of contents Preface The role of render Rend...
In the past few years, I have been moving back an...
Enter /usr/local/nginx/conf sudo cd /usr/local/ng...
Table of contents 1. Basic concepts and basic com...
If you are using the latest Ubuntu Server version...
name character name character information news te...
This article records the installation and configu...
1. float+overflow:hidden This method mainly trigg...
This article example shares the specific code of ...
1. Check whether event is enabled show variables ...
This article attempts to write a demo to simulate...
Use the rpm installation package to install mysql...
Let me first introduce to you that the node proce...
The command to delete images in docker is docker ...