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

Recommend

CSS3 border effects

What is CSS# CSS (abbreviation of Cascading Style...

Analysis of the difference between emits and attrs in Vue3

Table of contents in conclusion Practice Analysis...

centos 7 modify sshd | prohibit root login and sshd port script definition

1. Create a new user wwweee000 [root@localhost ~]...

Detailed process of building mongodb and mysql with docker-compose

Let's take a look at the detailed method of b...

Vue implements simple data two-way binding

This article example shares the specific code of ...

Detailed explanation of two points to note in vue3: setup

Table of contents In vue2 In vue3 Notes on setup ...

Native js to achieve accordion effect

In actual web page development, accordions also a...

Detailed explanation of Vue slot

1. Function : Allows the parent component to inse...

UTF-8 and GB2312 web encoding

Recently, many students have asked me about web p...

Explore VMware ESXI CLI common commands

Table of contents 【Common commands】 [Summary of c...

Analysis of MySQL duplicate index and redundant index examples

This article uses examples to describe MySQL dupl...

Simple Mysql backup BAT script sharing under Windows

Preface This article introduces a simple BAT scri...

Design Theory: A Method to Understand People's Hearts

<br />Once, Foyin and Mr. Dongpo were chatti...

React antd tabs switching causes repeated refresh of subcomponents

describe: When the Tabs component switches back a...