I have just used phpMyAdmin on my local WAMP SERVER on WINDOWS 10 for the first time in about 6 months. I am using localhost:8080. I thought I had no password, however when it asks me to log in I put:
username: root
password: [I leave this blank]
I cannot log in.
I do not think I created a new password 6 months ago, but there is a small possibility I did and have now forgotten about it.
So now I am locked out of my phpMyAdmin.
I have tried the solution here by RiggsFolly:
[stackoverflow.com]
But no luck.
I do the following:
Stop the mysql service
wampmanager -> MySQL -> Service -> Stop Service
Edit the my.ini file
wampmanager -> MySQL -> my.ini
Find the wampmysqld64 section in the ini file Add this line directly after that section heading
skip-grant-tables
Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service
Open the MySQL console
wampmanager -> MySQL -> MySQL Console
It asks for the password, but I just tap enter and it seems to skip that. I then get the MySQL> prompt.
I have version 5.7.9 so I enter the following:
UPDATE mysql.user SET authentication_string=PASSWORD('MyNewPass') WHERE User='root';
Sometimes it gives a warning, but I do not know what.
I should then do the following two commands now, but I get a problem:
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;
It says (after the ALTER USER bit):
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
If I do the obvious thing and stop the service as above and then alter the .ini file again to remove that line. I then restart and retype the ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; command. This time it complains saying I should have just done a password change to make this command. (It basically thinks I have not just done the password change as I have had to shut down the system, alter the ini file and then restart in between the commands.)
So I am stuck at this point getting nowhere fast.
If the ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; and FLUSH PRIVILEGES; had worked, I would have then have had to continue with the following:
At the console mysql> prompt I would then need to type:
quit;
Then stop the mysql service:
wampmanager -> MySQL -> Service -> Stop Service
Edit the my.ini file
wampmanager -> MySQL -> my.ini
Find the wampmysqld64 section in the ini file Remove the skip-grant-tables parameter we added earlier.
Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service
However, as I am stuck at those two commands with no workaround I remain locked out of phpMyAdmin
username: root
password: [I leave this blank]
I cannot log in.
I do not think I created a new password 6 months ago, but there is a small possibility I did and have now forgotten about it.
So now I am locked out of my phpMyAdmin.
I have tried the solution here by RiggsFolly:
[stackoverflow.com]
But no luck.
I do the following:
Stop the mysql service
wampmanager -> MySQL -> Service -> Stop Service
Edit the my.ini file
wampmanager -> MySQL -> my.ini
Find the wampmysqld64 section in the ini file Add this line directly after that section heading
skip-grant-tables
Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service
Open the MySQL console
wampmanager -> MySQL -> MySQL Console
It asks for the password, but I just tap enter and it seems to skip that. I then get the MySQL> prompt.
I have version 5.7.9 so I enter the following:
UPDATE mysql.user SET authentication_string=PASSWORD('MyNewPass') WHERE User='root';
Sometimes it gives a warning, but I do not know what.
I should then do the following two commands now, but I get a problem:
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;
It says (after the ALTER USER bit):
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
If I do the obvious thing and stop the service as above and then alter the .ini file again to remove that line. I then restart and retype the ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; command. This time it complains saying I should have just done a password change to make this command. (It basically thinks I have not just done the password change as I have had to shut down the system, alter the ini file and then restart in between the commands.)
So I am stuck at this point getting nowhere fast.
If the ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER; and FLUSH PRIVILEGES; had worked, I would have then have had to continue with the following:
At the console mysql> prompt I would then need to type:
quit;
Then stop the mysql service:
wampmanager -> MySQL -> Service -> Stop Service
Edit the my.ini file
wampmanager -> MySQL -> my.ini
Find the wampmysqld64 section in the ini file Remove the skip-grant-tables parameter we added earlier.
Restart the mysql service.
wampmanager -> MySQL -> Service -> Start/Resume Service
However, as I am stuck at those two commands with no workaround I remain locked out of phpMyAdmin