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

What if the MySQL5.6 version forgets the database root password?

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

Share

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

The following brings you about MySQL version 5.6 forget database root password how to do content, I believe you must have read similar articles. What's the difference in what we bring to you? Let's take a look at the body part. I believe that after reading MySQL 5.6 version, you will definitely have something to gain if you forget the database root password.

First edit the/etc/my.cnf file

vim /etc/my.cnf

Add a sentence to the paragraph [mysqld]: skip-grant-tables

For example:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

skip-grant-tables=1

Save and exit vi.

Restart mysqld

service mysqld restart

#Enter the database as root (enter directly without password)

vim /etc/my.cnf

Remove skip-grant-tables=1 from paragraph [mysqld]

For example:

[mysqld]

datadir=/var/lib/mysql

socket=/var/lib/mysql/mysql.sock

Save and exit vi.

Restart mysqld again

service mysqld restart

#Try a new password to log in (just fill in the new password in the password column)

So, our MySQL root password reset is complete.

For the above version of MySQL 5.6 forget database root password how to do, we think it is what they want? If you want to know more about it, you can continue to pay attention to 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