Mentally Unstable Tugboat Captain
Posts: 797
Name: Chad
Location: /usr/bin/perl
|
Yesterday, I was troubleshooting a user at my host who had lost their MySQL passwords. They had two users in question. After thinking the only choice was to login to root phpmyadmin, dump the dbases, and then have them reimport them with a new user assigned, I came upon a solution. I was searching the internet for a way to reset the MySQL passwords, and luckily, MySQL.Com came to the rescue. Here's the trick.
- Login to SSH/Telnet (I used root. If you have some other user that can globally control MySQL, that will work too.
- Type in mysql and press enter (unless you have some other process name for MySQL)
- At this point, you should be in the MySQL management console
- At the "->" indicator, type in UPDATE mysql.user SET Password=PASSWORD('new_password_choice')
- Press enter
- At the next prompt, type WHERE User='username_to_change_password_for';
- DO NOT FORGET THE FINAL SEMI-COLON
- Then type FLUSH PRIVILEGES; (once again, not forgetting the final semi-colon).
You're done! The password should be reset. Hope this helps someone else at some point.
__________________
He's baaaaaaaack....
Last edited by WaHoOoO! : 01-25-2005 at 01:41 PM.
Reason: Typo
|