2

Am using wamp server,where in my project I need to change the userid and password of mysql.I want to change it to username:-"root" password:-"root123".How it is possible?

5 Answers 5

3

you would need...

$ mysqladmin -u root -p'oldpassword' password newpass

Sign up to request clarification or add additional context in comments.

Comments

0

I'd say the easiest way would be to log into phpMyAdmin and update the values in the data.

Comments

0

Enter to WAMP mysql console and write:

CREATE USER 'root'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;

to remove old user

DROP USER 'olduser'@'localhost';

If you are using WAMP on grahical interface, right click on the system tray WAMP and check MySQL section.

Comments

0

Yes it is possible.

Just run (example under windows):

  • Win + r
  • cmd in the run box, hit enter
  • go to your wamp install dir and look for the mysql bin, eg. "cd C:\wamp\apps\phpMyAdmin-3.3.3"
  • run: mysqladmin -uroot password NEWPASSWORD

and it's done.

Comments

0

Go to MySQL Console and then type this in the following prompt

mysql>update mysql.user SET password=password("newpass");

Press "Enter Key"

mysql>flush privileges;

Press "Enter Key"

Restart MySQL Service.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.