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

How to use Nginx to handle cross-domain Vue development environment

1. Demand The local test domain name is the same ...

Detailed explanation of Redis master-slave replication practice using Docker

Table of contents 1. Background 2. Operation step...

Nginx cache configuration example

When developing and debugging a web application, ...

Detailed explanation of incompatible changes of components in vue3

Table of contents Functional Components How to wr...

12 Laws of Web Design for Clean Code [Graphic]

Beautiful code is the foundation of a beautiful we...

Alibaba Cloud Server Ubuntu Configuration Tutorial

Since Alibaba Cloud's import of custom Ubuntu...

How to periodically clean up images that are None through Jenkins

Preface In the process of continuous code deliver...

A brief discussion on whether CSS will block page rendering

Maybe everyone knows that js execution will block...

Summary of 3 ways to lazy load vue-router

Not using lazy loading import Vue from 'vue&#...

Basic knowledge of website design: newbies please read this

Now many people are joining the ranks of website ...

How to configure two-way certificate verification on nginx proxy server

Generate a certificate chain Use the script to ge...

Detailed tutorial on compiling and installing MySQL 5.7.24 on CentOS7

Table of contents Install Dependencies Install bo...