Where to change mysql database password

藏色散人
Release: 2020-11-13 09:32:56
Original
3801 people have browsed it

How to modify the password of mysql database: first open the "Task Manager" and end the mysqld process task; then open the "command prompt" and enter "cd mysql installation directory\bin"; finally modify the password field" authentication_string" can be used.

Where to change mysql database password

## Recommended: "mysql video tutorial"

##Modify mysql database password

Prerequisite: Operate on the computer where themysqldatabase service is located;

Operation:

1.

Open [Task Manager] and endmysqldProcess task;

#2.

Find themysqlinstallation location;

##

3.Findmy.iniin themysqlinstallation directory and open it in Notepad mode File, addskip-grant-tables,under[mysqld]The purpose is to skip database permission authentication;

##4.Quick Keywin R, open [Run];

# #5.

Enterservices.mscin [Run], open [Service], and startmysqlServe;

6.Entercmdin [Run] to open the [Command Prompt];

##7.Entercd mysqlInstallation directory\bin

8.Entermysql,to enter the database view;

9.EnterS##h## ow databases;,CheckView all databases;

##10.

Enteruse mysql;,entermysqlDatabase;

##

11.Enters##how tables;,View all tables inmysqldatabase;

##12.

Enters##elect host,user,authentication_string from user;,mysql5.7The field where the password is stored in the version database isauthentication_string;

13.Enterupdate user set authentication_string=password('root') where user='root'## and host='localhost';,Modify the login password of this machineroothere toroot; (If you want to modify other computers to connect to the database at the same time The password of the service does not require the judgment conditionhost='localhost')

14.Enterf##lush privileges;Refresh permissions;

15.EnterQuit;,Exit the database view;

16.Delete or comment the skip permission statement added in step threeskip -grant-tables;

##17.

Restartmysqlservice;

18.In the command prompt, navigate to the database installation location\binand entermysql -uroot -proot,can be logged in normally and the modification is successful.

The above is the detailed content of Where to change mysql database password. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!