简体   繁体   中英

Cannot Change MySQL password

All the questtions and answers here in Stackoverflow are about not knowing to reset the root password. Which I have already tried following mysql site. http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html

On trying to do this, the cursor on command line goes to next line and continues to blink endlessly. No response occours even after an hour.

What is actually happening? Is there any way to solve this?

Note, I have followed the steps about stopping the service)

For windows I did something like this and it worked for me.

C:\> C:\mysql\bin\mysqld-nt --init-file=C:\\mysql-init.txt

where mysql-init.txt

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

if you installed with MySQL Installation Wizard then you might need to add this option during the reset

--defaults-file="C:\\Program Files\\MySQL\\MySQL Server 5.0\\my.ini"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM