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
When learning about inline-block, I found that the...
In MySQL, the LOAD_FILE() function reads a file a...
Install MySQL and keep a note. I don’t know if it...
There was a shaking barrage on TikTok a while ago...
This article shares the specific code of js to im...
This article briefly introduces the relationship ...
Script requirements: Back up the MySQL database e...
Table of contents Preface 1. Basic Environment 1....
The data backup operation is very easy. Execute t...
Given a div with the following background image: ...
Table of contents use Install How to use it in ro...
There are many reasons why an application is as s...
This article is mysql database Question 1 Import ...
1. Download Download mysql-5.7.19-linux-glibc2.12...
1. Pull the image docker pull registry.cn-hangzho...