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
In actual project development, if we have a lot o...
Provide login and obtain user information data in...
Table of contents Preface JS Magic Number Storing...
Use "onInput(event)" to detect whether ...
Table of contents Achieve results Introduction to...
1. First check whether the system has mysql insta...
Table of contents 1. Commonjs exports and require...
1. Uninstalling MySQL 5.7 1.1查看yum是否安裝過mysql cd y...
The scroll-view of WeChat applet has more bugs wh...
1. Docker ps lists containers 2. Docker cp copies...
Table of contents Preface Mixin Mixin Note (dupli...
Modify the group to which a user belongs in Linux...
Table of contents 1. Project Description: 2. Proj...
1. Check whether the check status module is insta...
In fact, this is also a clickbait title, and it c...