All prerequisites require root permissions 1. End the mysql process //Linux sudo services mysql stop //Mac brew services stop mysql 2.mysql background running mysqld_safe --skip-grant-tables & mysql &, means running in the background without opening a new terminal 3. Change password use mysql; update user set password = password("new password") where user='root'; flush privileges; Knowing the original password Use the mysqladmin command on the command line mysqladmin -u root -p oldpassword "newpassword" Or you can enter the MySQL database and modify it directly, refer to the third step above [Change Password] The above is the method of changing the password of Linux/Mac MySQL command line when you forget the password. I hope it will be helpful to you. If you have any questions, please leave me a message and I 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:
|
<<: Detailed explanation of docker command to backup linux system
>>: How to use Dayjs to calculate common dates in Vue
summary Project description format <img src=&q...
This article example shares the specific code of ...
Table of contents npm download step (1) Import (2...
1) Scope of application: readonly:input[type="...
Basic knowledge of responsive layout development ...
Let me first talk about the implementation steps:...
This article shares the specific code of JavaScri...
1. Apache 2.4.41 installation and configuration T...
Problem description: The user has a requirement t...
Table of contents 1. How to monitor Tomcat 2. Jav...
Table of contents Show Me The Code Test the effec...
This article shares the specific code of js to ac...
I have recently been following the CSS Animation ...
When setting display:flex, justify-content: space...
I installed MySQL on Windows by unzipping the com...