How to change password in MySQL 5.7.18

How to change password in MySQL 5.7.18

How to change the password in MySQL 5.7.18:

1. First shut down the MySQL server:

You can shut down mysql directly in the task manager, or you can shut down mysql in cmd: net stop mysql

2. Open the safe mode and log in without a password: In cmd, jump to the installation directory: d:

   cd D:\Mysql\mysql-5.7.18-winx64\bin

Then enter: mysqld --defaults-file="D:\Mysql\mysql-5.7.18-winx64\my.ini" --console --skip-grant-tables (note to modify the installation path yourself)

3. Open another DOS window and enter mysql -uroot -p , then press the enter key to enter without entering a password;

4. Next, open the mysql database: use mysql;

Then enter update mysql.user set authentication_string=password('new password') where user='root';
Then refresh the permissions: flush privileges;
Then exit: quit;

5. Open the MYSQL server! ! ! You can open it manually or enter net start mysql in cmd to open it.

6. Next you can log in using your new password.

The above is the method of changing the password of MySQL5.7.18 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:
  • Solve the problem of forgetting password in MySQL 5.7 under Linux
  • Summary of how to modify the root password in MySQL 5.7 and MySQL 8.0
  • Tutorial on installing and changing the root password of MySQL 5.7.20 decompressed version
  • MySQL 5.7.21 installation and password configuration tutorial
  • How to install and modify the initial password of mysql5.7.18 under Centos7.3
  • How to install and modify the initial password of mysql5.7.18
  • How to change the root password of Mysql5.7.10 on MAC
  • What to do if you forget the root password of Mysql5.7 (simple and effective method)
  • Mysql5.7.14 installation and configuration method operation graphic tutorial (password problem solution)
  • Detailed explanation of the solution to forget the password in MySQL 5.7

<<:  WeChat applet development chapter: pitfall record

>>:  Ubuntu Server Installation Tutorial in Vmware

Blog    

Recommend

Solve the problem of blank gap at the bottom of Img picture

When working on a recent project, I found that th...

Analysis of JavaScript's event loop mechanism

Table of contents Preface: 1. Reasons for the eve...

Detailed explanation of Nginx's control over access volume

Purpose Understand the Nginx ngx_http_limit_conn_...

Briefly understand the MYSQL database optimization stage

introduction Have you ever encountered a situatio...

Summary of HTML formatting standards for web-based email content

1. Page requirements 1) Use standard headers and ...

...

How to use the Clipboard API in JS

Table of contents 1. Document.execCommand() metho...

JavaScript event loop case study

Event loop in js Because JavaScript is single-thr...

Native JS to achieve blinds special effects

This article shares a blinds special effect imple...

A brief discussion on the underlying principle of mysql join

Table of contents join algorithm The difference b...

A brief analysis of the basic concepts of HTML web pages

What is a web page? The page displayed after the ...

Solution to MySQL server login error ERROR 1820 (HY000)

Fault site: Log in to the MySQL server and get th...

Tutorial analysis of quick installation of mysql5.7 based on centos7

one. wget https://dev.mysql.com/get/mysql57-commu...

How to use Cron Jobs to execute PHP regularly under Cpanel

Open the cpanel management backend, under the &qu...

10 HTML table-related tags

In fact many people will say “I’ve seen that table...