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

How to correctly change the ROOT password in the above version of MYSQL8.0

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "how to correct the ROOT password for the above MYSQL8.0 version". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "how to correctly change the ROOT password in the above MYSQL8.0 version"!

Deployment environment:

Install version red hat Cent 7.0

MYSQL version 8.0.2.0

Failure condition occurs after successful deployment:

1. After starting the MYSQL service normally, you cannot enter it by tapping the root account and password in Linux.

two。 Log in normally after adding skip-grant-tables from the / etc/my.cnf configuration file, but cannot create multiple operations such as users

To sum up:

If you want to enter mysql, you can't operate multiple instructions, and you can't enter mysql if you want to operate multiple instructions.

Digging the hole:

Many ways have been found on the Internet, first of all, join skip-grant-table. Then go in and refresh the permission table, restart the service, enter the root without a password, and refresh the permission table after changing the root password. I've tried a lot of methods, but they're all wrong. It is always wrong to modify the root.

Second, use the SQL tool for remote connection, here using SQLyog for remote connection.

Generally speaking, it is not possible to connect directly with the ROOT user's account password, the instant password is correct.

A new mysql_native_password function has been added in MYSQL 8.0 to make remote connections by changing the password of this function.

2.1First, you can change the native_password password of a ROOT user.

Mysql > ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY'MyPass@123'

Query OK, 0 rows affected (0.15 sec)

Note: changing the mysql_native_passwd password is equivalent to changing the user's original password. MYSQL 8.0 is dominated by mysql-native_passwd, so you should pay attention to logging in from the Shell interface.

At this point, I believe that everyone on the "MYSQL8.0 version of how to correctly modify the ROOT password" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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