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
Preface The MySQL permission table is loaded into...
MySQL's CAST() and CONVERT() functions can be...
Triggers can cause other SQL code to run before o...
Basically all e-commerce projects have the functi...
Table of contents Function Introduction function ...
1. Add Maria source vi /etc/yum.repos.d/MariaDB.r...
Table of contents 1. Environmental Preparation 1....
I have encountered many centering problems recent...
Search Page: search.wxml page: <view class=&qu...
If you accidentally modify the source.list conten...
Table of contents VARCHAR and CHAR Types Conclusi...
Copy code The code is as follows: <html> &l...
Checkboxes are very common on web pages. Whether ...
1. Confirm whether MySQL has been installed. You ...
Implement Nginx load balancing based on Docker ne...