Reputation: 336
In the process of trying to set up my database on phpmyadmin to have a password, I was locking things (stupidly) and accidentally locked the localhost access.
I've tried:
my.ini
.config.inc.php
& changing the port from 3306
-> 4306
./* Authentication type and info */ $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'USER'; $cfg['Servers'][$i]['password'] = 'PASS'; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Servers'][$i]['port'] = 4306; $cfg['Lang'] = '';
Note: even when changing to
$cfg['Servers'][$i]['AllowNoPassword'] = false;
it still doesn't work.
Note #2: when changing to
$cfg['Servers'][$i]['auth_type'] = 'cookie';
I get this error on the login page.
mysql -p -u root
& mysql -p -u USER
but get this error when entering the right credentials:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
mysql stop
but get this error (based on looking at this thread):ERROR 1045 (28000): Access denied for user 'MYNAME'@'localhost' (using password: NO)
So, I've come the conclusion there is something I need to do in order to unlock accessing phpmyadmin via localhost, but I have no idea what. I don't think the problem is relating to an invalid password or username but instead just localhost being "locked".
How do I unlock it?
Upvotes: 0
Views: 5014
Reputation: 54
I faced the same issue, and I resolved it in the following way.
I faced this issue on a XAMPP server, and I opened up the XAMPP server and restarted all of the services. Then stopped all of the services and started again.
That lock option in phpmyadmin is basically to lock users out for that particular session, which means whenever you restart, everything will reconfigure in case you locked yourself out.
Upvotes: 3
Reputation: 336
I just uninstalled and re-installed xampp and that did it. Just have to re-set up my database
Upvotes: 0
Reputation: 684
Try to bring down your mysql instance, followed by
mysqld_safe --skip-grant-tables
then make your changes, like changing the password or the access limitation.
Example:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
After that, flush the privileges and restart mysql.
Upvotes: 1