Link to home
Start Free TrialLog in
Avatar of SAbboushi
SAbboushiFlag for United States of America

asked on

Can't connect to MySQL database re: mysql_old_password

Running MySQL 5.6 under W7 64

Was looking for a workaround to get an old app to connect with MySQL db.  Tried:

SET PASSWORD FOR 'user'@'host' = OLD_PASSWORD('current_password');

Open in new window


but it returned
 Warnings received:

0 row(s) affected, 2 warning(s): 1287 'OLD_PASSWORD' is deprecated and will be removed in a future release. Please use PASSWORD instead 1287 'pre-4.1 password hash' is deprecated and will be removed in a future release. Please use post-4.1 password hash instead

I tried using PASSWORD as the warning suggested, but think it also returned 0 rows affected

I mistakenly assumed that the commands had not changed anything...

Seems I've locked myself out: when I try to connect from MySQL Workbench, I'm now getting:
User generated image
Please Help!
ASKER CERTIFIED SOLUTION
Avatar of Doug Walton
Doug Walton
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
Avatar of SAbboushi

ASKER

Thanks - I tried resetting root password under windows per link you provided.  In my case:
"C:/Program Files/MySQL/MySQL Server 5.6/bin\mysqld" --defaults-file="D:\Documents\Application Data\MySQL\my.ini" --init-file=D:\\mysql-init.txt

Open in new window


However, server now won't even restart.

I'm not sure whether this is a step forward, or a step back ; )

Errors in log:
2016-01-29 19:18:42 11556 InnoDB: .\ibdata1 can't be opened in read-write mode
2016-01-29 19:18:42 11556 InnoDB: The system tablespace must be writable!
2016-01-29 19:18:42 11556 Plugin 'InnoDB' init function returned error.
2016-01-29 19:18:42 11556 Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-01-29 19:18:42 11556 Unknown/unsupported storage engine: INNODB
2016-01-29 19:18:42 11556 Aborting

2016-01-29 19:18:42 11556 [Note] Binlog end

I'm using Admin CMD prompt and Administrator has full rights to MySQL Data directory.

Any thoughts?
Found a mysqld.exe process running - killed it and restarted server.  Looks like I'm good now.

Thanks!!

Didn't realize I could so easily reset MySQL root password.  As an aside, shouldn't this concern me?
Nice glad that helped!  

Yeah it's a little concerning, but as long as the admin user is locked down well it should be fine (only the admin user should be able to change the root password).
You mean the Windows admin user, right?
Yeah, I'm pretty sure anyone with administrator privileges on that windows machine would be able to change the root mysql password.
K thanks - so my takeaway from this: anyone who can get admin access to a MySQL server can reset the root password and get access to all MySQL data?

I mistakenly assumed that MySQL root password was secure.  Thanks again for all your help