Reply
MySQL Trick!
Old 01-25-2005, 01:12 PM MySQL Trick!
WaHoOoO!'s Avatar
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
WaHoOoO! is offline
Reply With Quote
View Public Profile Visit WaHoOoO!'s homepage!
 
When You Register, These Ads Go Away!
Old 01-25-2005, 01:36 PM
Republikin's Avatar
Super Moderator

Posts: 3,191
Good to know, thanks for that tidbit WaHoOoO!
Republikin is offline
Reply With Quote
View Public Profile
 
Old 02-27-2005, 07:47 PM
Average Talker

Posts: 17
you might want to tag a limit 1 on to the end of your user='username' line there.
When editing the mysql.user table, you don't want to hit enter at the wrong time (2am
while you are trying to restore a lost database).
The line would look like
Code:
UPDATE mysql.user SET Password=PASSWORD('new_password_choice') WHERE User='username_to_change_password_for' Limit 1;
~James
ortel is offline
Reply With Quote
View Public Profile
 
Old 03-24-2005, 09:28 AM
chiefbutz's Avatar
Skilled Talker

Posts: 56
Name: Jason
Location: Indiana (USA)
Wow this is really nice to know! Great bit of info.
chiefbutz is offline
Reply With Quote
View Public Profile Visit chiefbutz's homepage!
 
Old 08-18-2005, 12:07 AM
Extreme Talker

Posts: 176
ive been wondering this for a long tim, but what exactly is ssh and telnet? i kinda know what telnet is but whats ssh?
wmtalk.tk is offline
Reply With Quote
View Public Profile
 
Old 08-23-2005, 12:19 PM
andrewsco's Avatar
Super Talker

Posts: 130
Its secure shell client. Have a read here:

http://www.jtan.com/resources/ssh.html

Cheers
Andy
__________________
My Webpage: www.computer-tutorials.org
andrewsco is offline
Reply With Quote
View Public Profile Visit andrewsco's homepage!
 
Old 09-02-2005, 06:24 PM
mikeroq's Avatar
Skilled Talker

Posts: 92
Name: Mike Roq
Location: Lakewood, CO
ssh is basiclly shell that is secure, like your at the command line of a remote machine
__________________
CodingHub.com
mikeroquemore.com
mikeroq is offline
Reply With Quote
View Public Profile Visit mikeroq's homepage!
 
Old 09-16-2005, 11:02 PM
Novice Talker

Posts: 13
If your on winBox you can just use DOS. You should also be using the same command to set your root accounts on a new MySQL server. See...

http://dev.mysql.com/doc/mysql/en/de...rivileges.html
capiCrimm is offline
Reply With Quote
View Public Profile
 
Old 09-24-2005, 10:40 AM
Extreme Talker

Posts: 169
Nice Info
__________________
FIND THE PERFECT WEB HOSTING
TOP 10 WEB HOSTS COMPARED

BEST RESELLER HOSTING
john551 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to MySQL Trick!
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.18767 seconds with 12 queries