Mysql5.7.14 Linux version password forgotten perfect solution

Mysql5.7.14 Linux version password forgotten perfect solution

In the /etc/my.conf file, add the following line under [mysqld]: skip-grant-tables

Remember to add it last under [mysqld], not under [ mysqld_safe ]

After saving, restart Mysql and execute directly in the Linux command line: mysql Enter

OK

To change your password:

update mysql.user set password=password('root') where user='root'

Result error:

mysql> select host,user,password from user;
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
desc user;

Check the fields and find that there is no password field, but there is an authentication_string field

update mysql.user set authentication_string=password('root') where user='root';

OK

Delete skip-grant-tables under [mysqld] in the /etc/my.conf file

Restart mysql

Summarize

The above is the perfect solution for forgetting the password of Mysql5.7.14 Linux version introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Linux create user useradd command code example
  • Detailed explanation of ls command parameters in Linux and examples of ls command usage
  • Detailed explanation of the usage of the common Linux command last
  • Detailed explanation of the usage of sed and awk in Linux
  • How to configure Tomcat8.0.44 to use Apr under Linux
  • How to install multiple mysql5.7.19 (tar.gz) files under Linux
  • MySQL 5.7.19 (tar.gz) installation graphic tutorial under Linux
  • Summary of how to use firewall in Linux

<<:  Vue achieves seamless carousel effect

>>:  Detailed explanation of the construction and use of Docker private warehouse

Recommend

Introduction to SSL certificate installation and deployment steps under Nginx

Table of contents Problem description: Installati...

Vue+flask realizes video synthesis function (drag and drop upload)

Table of contents We have written about drag and ...

Let's deeply understand the event object in js

We know that the commonly used events in JS are: ...

Sample code for realizing book page turning effect using css3

Key Takeaways: 1. Mastering CSS3 3D animation 2. ...

Detailed explanation of how MySQL (InnoDB) handles deadlocks

1. What is deadlock? The official definition is a...

MySQL statement execution order and writing order example analysis

The complete syntax of the select statement is: S...

JavaScript color viewer

This article example shares the specific code of ...

Vue achieves seamless carousel effect (marquee)

This article example shares the specific code of ...

MySQL 8.X installation tutorial under Windows

I had been using MySQL 5.7 before, but because My...

NodeJS realizes image text segmentation

This article shares the specific code of NodeJS t...

MySQL InnoDB tablespace encryption example detailed explanation

Preface Starting from MySQL 5.7.11, MySQL support...

Detailed explanation of how components communicate in React

1. What is We can split the communication between...

IE6 web page creation reference IE6 default style

This is not actually an official document of IE. I...