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

Specific operations of Percona mysql5.7 to modify the default password

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I don't know if you have any knowledge about the specific operation of changing the default password in Percona mysql5.7 before. Today, I'm here to tell you briefly. If you are interested, let's take a look at the body. I believe you will gain something after reading the specific operation of Percona mysql5.7 to change the default password.

Percona mysql5.7 changes the default password

The following is the operation in the linux environment.

The Percona mysql5.7 Centos/Red Hat-RPM package does not display passwords during installation. It's in the log. The automatically generated my.cnf contains this line of log-error=/var/log/mysqld.log.

So check the password through the terminal:

[root@izuf61hued2py4dh0dsgfyz lyh] # cat / var/log/mysqld.log | grep "temporary password" 2017-06-26T04:28:05.537965Z 1 [Note] A temporary password is generated for root@localhost:

Careless wBbind iCouldl7eL

Be careful! Special symbols need to be escaped, log in to mysql through the above.

[root@izuf61hued2py4dh0dsgfyz lyh] # mysql-uroot-pca\! wB\ / i+l7eL

If the following prompts appear, please follow the steps.

You must reset your password using ALTER USER statement before executing this statement.

1. SET PASSWORD = PASSWORD ('root')

If you prompt that the password security level is too low, "ERROR 1819 (HY000): Your password does not satisfy the current policy requirements", you need to modify the global variable, as follows

2 、 set global validate_password_policy=0

3 、 set global validate_password_mixed_case_count=2

4. Alter user 'root'@'localhost' password expire never

5 、 flush privileges

Do the following as appropriate:

Authorization: grant all on *. * to 'root'@'%' identified by' Lghs35123' with grant option

Open firewall port centos7:firewall-cmd-- zone=public-- add-port=3306/tcp-- permanent

Note that different versions of inux have different firewall commands.

After reading this article on the specific operation of Percona mysql5.7 to change the default password, what do you think? If you want to know more about it, you can continue to follow our industry information section.

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

Database

Wechat

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

12
Report