1. Delete the original mariadb, otherwise mysql cannot be installed mariadb-libs-5.5.52-1.el7.x86_64 rpm -qa|grep mariadb rpm -e --nodeps mariadb-libs 1. Select Red Hat Enterprise Linux 7 / Oracle Linux 7 from https://dev.mysql.com/downloads/mysql/ and select all for the OS version. Download rpm -ivh mysql-community-common-5.7.21-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.21-1.el7.x86_64.rpm rpm -ivh mysql-community-devel-5.7.21-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-compat-5.7.21-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.21-1.el7.x86_64.rpm rpm -ivh mysql-community-server-5.7.21-1.el7.x86_64.rpm At this point, all mysql5.7 files have been installed, and the next step is to start the service test. 1. First shut down the mysql service: 2. Then modify the configuration file: 3. Next, add a line of code to log in to MySQL with an empty password: # Disabling symbolic-links is recommended to prevent assorted security risks skip-grant-tables #Add this sentence, then you don't need a password to log in to MySQL symbolic-links=0 4. Start the mysql service: 5. Log in to mysql with an empty password: 6. Set mysql password: mysql> set password for root@localhost = password('123456'); ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement mysql> flush privileges; #Update privileges Query OK, 0 rows affected (0.00 sec) mysql> set password for root@localhost = password('123456'); Query OK, 0 rows affected, 1 warning (0.00 sec) mysql>flush privileges; #Update privilegesmysql>quit; #Exitservice mysqld stop #Stop MySQL service and restore MySQL configurationvim /etc/my.cnf #Modify configuration file# Disabling symbolic-links is recommended to prevent assorted security risks # skip-grant-tables # Comment out this sentence symbolic-links=0 service mysqld start # Start mysql service mysql -uroot -p # Enter new password to log in 7. Set MySQL to start automatically at boot: Summarize The above is the tutorial on CentOS7 offline installation of MySQL introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to permanently change the host name in Linux
>>: The most complete package.json analysis
1. Overview mysql-monitor MYSQL monitoring tool, ...
Table of contents background Solution 1 Ideas: Co...
Special note: Only the Swoole extension is instal...
1. Click the server host and click "Virtual ...
This article example shares the specific code of ...
This article shares a draggable login box impleme...
Table of contents What is a web container? The Na...
In daily development, front-end students often ar...
Why do you need to learn CSS overflow mechanism i...
Notice! ! ! This situation can actually be avoide...
Songti: SimSun Bold: SimHei Microsoft YaHei: Micr...
1. Compile proto Create a new proto folder under ...
Table of contents 1. We must ensure that the vue/...
I've been playing with the remote development...
Table of contents MySQL result sorting - Aggregat...