Do not use this method in an environment with a management panel (such as Kloxo or DA.
The command for starting MySQL in safe mode in Line 1 of the script varies depending on the MySQL installation path.
The mysql service name used in the script is mysqld. in some systems, this service name may be mysql. please modify it.
(2) Windows 1. stop the running MySQL process
Net stop mysql
If it is not loaded as a service, you can close it directly in the process manager.
2. start MySQL in safe mode
Run
X:/MySQL/bin/mysqld-nt.exe -- skip-grant-tables
3. you will be able to access MySQL without a password.
X:/MySQL/bin/mysql-u root-p
Enter the password and press enter.
4. change the password
> Use mysql
> Update user set password = password ("new password") where user = "root ";
> Flush privileges;
5. start MySQL
Close all MySQL processes in the Task Manager and start them with the following command.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.