yandoo Posted June 19, 2013 Share Posted June 19, 2013 (edited) Hiya jees I'm having a nightmare if you can help me please you'd be saving my life! I'm using wamp and phpmyadmin. I created a database and then decided to add a password to it in phpmyadmin by going to users > root > and copy and pasted my password in twice. As soon as it saved I was kicked out of phpmyadmin. Since then I have been trying to use command prompt to get access to the database but the passwors is not being accepted. So I tried resetting the password by creating a mysql-init.txt using the code "UPDATE mysql.user SET Password=PASSWORD('worldpeace') WHERE User='root'; FLUSH PRIVILEGES;" Then I shut down mysql service and pathed in using "C:\wamp\bin\mysql\mysql5.5.24\bin mysqld --init-file=C:\\mysql-init.txt --console" This doesn't work for me! It just hangs at the end and never restarts the service, which is when the password is suppose to be changed. Please see screenshot of command prompt. Ok so after this attempt I have tried to get in by: mysql -u root -h 127.0.0.1 -P 3306 -p Enter password which I leave blank I then wanted to try and see the database so used show databases and was presented with ONLY the information_scheme and test! Surely I can't have deleted the database!!??? OMG I'm gona get fired. Additionally i have tried: mysql.exe -u=root -p=admin. I get an error "Error 1045 (28000) : Access denied for user '=root'@'localhost (using password: Yes) " If anybody can please please help me get my password reset you ill be saving my life! Thank you p.s. please note i have just used mysql.exe -u=root -p Enter password leave blank And from here I can show databases; and can see my database, so its not deleted! I just need to rest the password so I can get in. Edited June 19, 2013 by yandoo Quote Link to comment https://forums.phpfreaks.com/topic/279366-cannot-reset-mysql-password/ Share on other sites More sharing options...
yandoo Posted June 19, 2013 Author Share Posted June 19, 2013 I've managed to enter the: "UPDATE mysql.user SET Password=PASSWORD('worldpeace') WHERE User='root';" "FLUSH PRIVILEGES;" It says: query ok 3 rows affected query ok 0 rows affected But when I try and access http://localhost/phpmyadmin/ I still cant get in! #1045 - Access denied for user 'root'@'localhost' (using password: NO) Oh man I'm screwed. Please help Quote Link to comment https://forums.phpfreaks.com/topic/279366-cannot-reset-mysql-password/#findComment-1436922 Share on other sites More sharing options...
Solution yandoo Posted June 19, 2013 Author Solution Share Posted June 19, 2013 I've bloody done it!! Jees maybe Ill not be fired just yet then, hehe. If there is any one out there who has a similar problem here's what I did: cmd to correct directory: C:\wamp\bin\mysql\mysql5.5.24\bin cmd command: mysql.exe -u=root -p Enter password Leave blank hit enter cmd command: UPDATE mysql.user SET Password=PASSWORD('mynewpassword') WHERE User='root'; cmd command: FLUSH PRIVILEGES; Find config.inc.php in wamp \apps \phpmyadmin\config.inc.php Edit file enter password in right section refresh wamp. pheeeew. I need a cigarette! Quote Link to comment https://forums.phpfreaks.com/topic/279366-cannot-reset-mysql-password/#findComment-1436925 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.