Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing mysql 5.7.26 in centOS7.4

2025-04-10 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "the method of installing mysql 5.7.26 in centOS7.4". In the daily operation, I believe that many people have doubts about the method of installing mysql 5.7.26 in centOS7.4. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "the method of installing mysql 5.7.26 in centOS7.4". Next, please follow the editor to study!

Mariadb is installed by default in centos, which is a branch of mysql, but for the sake of need, mysql is installed on the system, and mariadb can be overwritten directly after installation.

1 download and install mysql's official yum repository

[root@localhost] # wget-I-c

Use the above command to download the installation yum repository directly, about what 25kb looks like, and then you can install yum directly.

[root@localhost] # yum-y install mysql57-community-release-el7-10.noarch.rpm

After that, the mysql server is installed.

[root@localhost ~] # yum-y install mysql-community-server

This step may take some time, and the previous mariadb will be overwritten after the installation is complete.

2 mysql database settings

Start mysql first

[root@localhost ~] # systemctl start mysqld.service

View the running status of mysql, as shown in the figure:

[root@localhost ~] # systemctl status mysqld.service

Mysql is running normally at this time, but to enter mysql, you need to find out the password of the root user at this time. You can find the password in the log file by using the following command:

[root@localhost ~] # grep "password" / var/log/mysqld.log

Enter the database with the following command:

[root@localhost] # mysql-uroot-p

Enter the initial password, and you can't do anything at this time, because mysql must change the password by default before you can manipulate the database:

Mysql > alter user 'root'@'localhost' identified by' new password'

Password set to 12 digits

Here is a problem. When setting a new password, an error will be reported if the setting is too simple:

The reason is that mysql has a specification for password setting, which is specifically related to the value of validate_password_policy:

After setting the password, it is finished.

At this point, the study on "the method of centOS7.4 installing mysql 5.7.26" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report