In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use the dnf method to install mysql in CentOS7, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
1. Install mysql's yum repository
Execute the following command:
Yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
two。 Install mysql
Dnf install mysql-community-server
3. Enable the mysql service
Service mysql start
4. Find the default password
To enhance security, MySQL5.7 randomly generates a password for root users, and in error log, with regard to the location of error log, the default is / var/log/mysqld.log if the RPM package is installed.
You can view the temporary password only after starting mysql once. Enter the following command to view the password:
Grep 'temporary password' / var/log/mysqld.log
The output is as follows:
[root@VM_0_13_centos init.d] # grep 'temporary password' / var/log/mysqld.log
2018-03-09T13:03:32.859149Z 1 [Note] A temporary password is generated for root@localhost: IVXhn:4E3uQ4
5. Log in to mysql and change your password
ALTER USER 'root'@'localhost' IDENTIFIED BY' root123'
If you change the password, it will appear:
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
Two global parameters must be modified:
First, modify the value of the validate_password_policy parameter
Set global validate_password_policy=0
Then change the length of the password
Set global validate_password_length=1
Just change the password again.
ALTER USER 'root'@'localhost' IDENTIFIED BY' root123'
6. Authorize other machines to connect
GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' passwort' WITH GRANT OPTION; / / passwort change to mysql login password FLUSH PRIVILEGES; about how to use the dnf method in CentOS7 to install mysql. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.