In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Delete the original mariadb, otherwise the mysql will not fit.
Mariadb-libs-5.5.52-1.el7.x86_64rpm-qa | grep mariadbrpm-e-- nodeps mariadb-libs
1. Select Red Hat Enterprise Linux 7 / Oracle Linux 7 in https://dev.mysql.com/downloads/mysql/ and select all as the version of os.
Download mysql-5.7.21-1.el7.x86_64.rpm-bundle.tar directly. All the rpm packages are in it.
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 the mysql5.7 files are installed, and the next step is to turn on the service test.
1. First, shut down the mysql service:
Service mysqld stop
two。 Then modify the configuration file:
Vim / etc/my.cnf
3. Next, add a code to log in to mysql with an empty password:
# Disabling symbolic-links is recommended to prevent assorted security risksskip-grant-tables # add this sentence. You don't need the password symbolic-links=0 to log in to mysql.
4. Enable the mysql service:
Service mysqld start
5. Log in with an empty password to mysql:
Mysql-u root-p # enter the command to enter, and enter the password prompt to enter directly
6. Set the 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 statementmysql > flush privileges; # Update permission 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 permission mysql > quit # exit service mysqld stop # stop mysql service, restore mysql configuration vim / 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=0service mysqld start # start mysql service mysql-uroot-p # enter a new password to log in
7. Set mysql to boot:
Systemctl enable mysqld
Summary
The above is the tutorial of CentOS7 offline installation of MySQL introduced by the editor to you. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.