Link to home
Start Free TrialLog in
Avatar of JohnnyBCJ
JohnnyBCJFlag for Canada

asked on

Failing to reset a MySQL Server 5.5 root password

I forgot the current root password so I need to change it. I've looked at the almost unlimited amounts of online resources on this topic for the last couple of days without any luck. I've looked at other questions on EE and I still can't figure it out (including one that has a bat file that changes the password).

I've also tried the steps on http://dev.mysql.com/doc/refman/5.5/en/resetting-permissions.html

I understand that mysqld hanging is normal but I can't get past that step. How long is it suppose to hang for? 15 minutes? 30 minutes? hours? As others suggested, I've opened up another command prompt and followed the rest of the procedures but can't get it to work.
SOLUTION
Avatar of arnold
arnold
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JohnnyBCJ

ASKER

Under MySQL service is :

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini" MySQL

if I try either of the following, the MySQL service does not start and I still can't use mysql -u root. The top one hangs, the bottom one goes through quickly.

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --skip-grant-tables --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini" MySQL

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld"--defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini --skip-grant-tables" MySQL
Did you try loging in with the new password?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The error will deal with the default file load.

The issue might be that you do not have a root login that the example tries to update a password.  He the ini process to add a new administrative account to the mysql setup as http:#a38586242 suggests.

Another option in the ini file is to get a select * from mysql.users output to an outside file.
C:\Program Files\MySQL\MySQL Server 5.5\bin>"C:\Program Files\MySQL\MySQL Server
 5.5\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini -
-skip-grant-tables"

Could not open required defaults file: C:\ProgramData\MySQL\MySQL Server 5.5\my.
ini --skip-grant-tables
Fatal error in defaults handling. Program aborted

C:\Program Files\MySQL\MySQL Server 5.5\bin>"C:\Program Files\MySQL\MySQL Server
 5.5\bin\mysqld"--defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini --
skip-grant-tables"
'"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld"--defaults-file' is not rec
ognized as an internal or external command, operable program or batch file.

C:\Program Files\MySQL\MySQL Server 5.5\bin>"C:\Program Files\MySQL\MySQL Server
 5.5\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini -
-skip-grant-tables"
Could not open required defaults file: C:\ProgramData\MySQL\MySQL Server 5.5\my.
ini --skip-grant-tables
Fatal error in defaults handling. Program aborted


The following hangs but the service hasn't started.

C:\Program Files\MySQL\MySQL Server 5.5\bin>"C:\Program Files\MySQL\MySQL Server
 5.5\bin\mysqld" --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.5\my.ini"
--skip-grant-tables
Try removing the default file specification:

"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --skip-grant-tables
I think the default file must be used in windows since the compiled in location might not be the same as the install.