In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
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 http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
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.
Summary
The above is the detailed explanation of the centOS7.4 installation mysql 5.7.26 tutorial 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 to 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.