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
1. Environment and preparation 1. Ubuntu 14.04 2....
Table of contents App Update Process Rough flow c...
1. ROW_NUMBER() Definition: The ROW_NUMBER() func...
Written in the opening: Absolute said: "Rela...
1. Problem reproduction: Count the total number o...
1 Problem Description Vue3's combined API can...
ylbtech_html_print HTML print code, support page t...
Due to hardware reasons, the machines may not kee...
Question 1: When entering net start mysql during ...
Today, when I was installing CentOS6.2, I couldn&...
After being tortured by the front-end cross-domai...
——Notes from "MySQL in Simple Terms (Second ...
Table of contents Basic Overview Enable GTID onli...
When coding, you will find that many things have ...
MultiTail is a software used to monitor multiple ...