Preface: The previous article introduced the MySQL installation tutorial under Windows in detail. This article starts with the most basic installation of 1. Delete the old version Check whether the server has built-in 2. Check the server kernel type, download the appropriate version and upload it to the server2.1. Use cat /proc/version to view the kernel type of the system2.2. Download the appropriate type from the official website2.3. Upload to the server via rz command or xftp tool
Command: rz or rz -be Format: rz -be Select the file to upload Upload files in batches or individually through the ZMODEM protocol. In addition, you can also upload via ftp or sftp
3. Unzip and install the corresponding components step by step3.1. Decompression command 3.2. Install component command: rpm -ivh component name to be installedFollow the following command sequence and change the file name to the name of the compressed file. //mysql-community-common 1. rpm -ivh mysql-community-common-8.0.16-2.el7.x86_64.rpm //mysql-community-libs 2. rpm -ivh mysql-community-libs-8.0.16-2.el7.x86_64.rpm --force --nodeps //mysql-community-libs-compat 3. rpm -ivh mysql-community-libs-compat-8.0.16-2.el7.x86_64.rpm //mysql-community-client 4. rpm -ivh mysql-community-client-8.0.16-2.el7.x86_64.rpm --force --nodeps //mysql-community-server 5. rpm -ivh mysql-community-server-8.0.16-2.el7.x86_64.rpm --force --nodeps // View installed components 6. rpm -qa | grep mysql 3.3. Start the MySQL server. If an error occurs, proceed to step 4. Start command: 3.4. If the following error is reported during startup, perform the corresponding steps to repair it
The explanation is that there is a conflict between the new version and the previous version of the server. Just delete the corresponding conflicting directory and execute: rm -rf /var/lib/mysql/* (be careful when executing the deletion command) 3.5. Execute after repair is completed 4. Connect to MySQL service and change passwordThe first time you successfully start MySQL, a default password will be set. Use the following command to view and log in.
ALTER USER root@localhost IDENTIFIED WITH caching_sha2_password BY '123456'; (MySQL 8.x is suitable for this statement) UPDATE USER SET PASSWORD=PASSWORD('your password') WHERE USER='root'; (modification of MySQL 5.x version) This is the end of this article about installing MySQL under Linux. For more information about installing MySQL under Linux, 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:
|
<<: How to use display:olck/none to create a menu bar
Recently I want to use goaccess to analyze nginx ...
⑴ Content determines form. First enrich the conten...
This article mainly introduces the simple impleme...
1. Introduction to Nginx Nginx is a web server th...
Preface I believe everyone knows that indexes are...
1. mysql export file: SELECT `pe2e_user_to_compan...
Table of contents Configuration parsing Service C...
During the development process, if garbled charac...
Creating a Vue 3.x Project npm init @vitejs/app m...
I recently stumbled upon the Audiovisual Linux Pr...
Introduction: The configuration of Docker running...
Table of contents principle Network environment p...
CSS3 can create animations, which can replace man...
Table of contents npm Install the loader Import P...
Two major categories of indexes Storage engine us...