Hello, I am just trying a bit to get out of leecher and to contribute! I hope that someone finds this useful. I use it, I keep accedentally resetting my password to default when trying to set up my private server to live :banghead:
1) Login to mysql server, type following command at shell prompt:
$ mysql -u root -p
2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
3) Change password for user root:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='root';
4) Reload privileges:
mysql> flush privileges;
mysql> quit
This method you need to use while using PHP or Perl scripting.
More information:
Sometimes you forget to set your information, the default information for MySQL is:
Username: root
Password: empty
However if you use something like Plesk software use following information:
User: admin
Password: admin
Sometimes, if you downloaded a repack or someone elses programs, you may have their configuration... your best bet is to ask them what the information is or... place these Fresh config files into your C:\Program Files\MySQL\MySQL Server 5.0\data\mysql (Backup old then overwrite) these files reset your username and password to:
root
<no password set> (just hit enter in the dos command shell)
Should be in where the folders of your database backups, in the mysql folder.
another good command:
GRANT USAGE ON *.* TO user@host IDENTIFIED BY 'password';
If no others work, try:
SET PASSWORD FOR ‘username’@'localhost’=PASSWORD(’new_password’);
Make sure not to have any databases selected!
I searched for any posts with this information, but didn't find any. I am sorry if this turns out to be a repost and/or failure.