Go Back   AnandTech Forums > Software > Programming

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2013
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 05-30-2008, 12:43 PM   #1
phaxmohdem
Golden Member
 
phaxmohdem's Avatar
 
Join Date: Aug 2004
Location: Missouri
Posts: 1,839
Default MySQL Export of MD5 password fields to new MySQL server

I am trying to move a website from my webhosts server to a server at my home. I have exported the online database using the export functions in phpMyAdmin. I have similarly imported that dump file into my new server at home using the Import features of phpMyAdmin, and everything went smoothly, except that when I go to try and log onto the site on my new server, it does not recognize the passwords anymore.

Is there a way to transfer the MD5 key so the users passwords are preserved? or do I just have to reset all the passwords manually and tell the users what their new passwords are?
__________________
---( Phenom II 940 || 8GB PC6400 || ASUS M2N32-SLI Deluxe || 2x 250GB R-0 + 2x 500GB R-0 || eVGA 8800GTX & eVGA 8600GT (Quad-Monitors) || Seasonic SS-700HM 700W || Cooler Master ATC-111c-SX2 Case )---

http://www.avxmedia.com
phaxmohdem is offline   Reply With Quote
Old 05-30-2008, 01:13 PM   #2
tfinch2
Lifer
 
tfinch2's Avatar
 
Join Date: Feb 2004
Posts: 22,072
Default MySQL Export of MD5 password fields to new MySQL server

Is there any version differences between the two MySQL servers?
__________________
unban ^[a-zA-Z0-9]+$
tfinch2 is offline   Reply With Quote
Old 05-30-2008, 01:17 PM   #3
Crusty
Lifer
 
Crusty's Avatar
 
Join Date: Sep 2001
Location: ATX
Posts: 12,311
Default MySQL Export of MD5 password fields to new MySQL server

First step would be to verify that the MD5 hashes in your new database match the ones from the old database. If they do not, then there was an error with your export/import, perhaps you did an MD5 of an MD5 or something. If the hashes match perfectly, then it sounds like your php code that handles logins is causing the problem.

We really need a lot more information. Are you salting the passwords at all? How does your login process work? Like tfinch2 said, you should try and keep the versions of your server software the same to try and rule those out.
__________________
Consequences will never be the same!

/^1?$|^(11+?)\1+$/
Crusty is offline   Reply With Quote
Old 05-31-2008, 02:46 AM   #4
phaxmohdem
Golden Member
 
phaxmohdem's Avatar
 
Join Date: Aug 2004
Location: Missouri
Posts: 1,839
Default MySQL Export of MD5 password fields to new MySQL server

I just manually reset the passwords as there are not many users at this point.. but in the future if I go back to an official web host I may run into this issue again. I don't know the MySQL versions off the top of my head, but I guarantee you they are a different build between the two servers.

I'm running WAMP server at home, the passwords I just use a simple password($user_pass) in the sql statement. I don't know if it is set up to salt the password or not. I did notice that between the two servers that the hashes on the old webserver were quite short compared to the ones my home server uses for the same phrase.
__________________
---( Phenom II 940 || 8GB PC6400 || ASUS M2N32-SLI Deluxe || 2x 250GB R-0 + 2x 500GB R-0 || eVGA 8800GTX & eVGA 8600GT (Quad-Monitors) || Seasonic SS-700HM 700W || Cooler Master ATC-111c-SX2 Case )---

http://www.avxmedia.com
phaxmohdem is offline   Reply With Quote
Old 05-31-2008, 10:01 AM   #5
tfinch2
Lifer
 
tfinch2's Avatar
 
Join Date: Feb 2004
Posts: 22,072
Default MySQL Export of MD5 password fields to new MySQL server

Quote:
Originally posted by: phaxmohdem
I just manually reset the passwords as there are not many users at this point.. but in the future if I go back to an official web host I may run into this issue again. I don't know the MySQL versions off the top of my head, but I guarantee you they are a different build between the two servers.

I'm running WAMP server at home, the passwords I just use a simple password($user_pass) in the sql statement. I don't know if it is set up to salt the password or not. I did notice that between the two servers that the hashes on the old webserver were quite short compared to the ones my home server uses for the same phrase.
That could be your problem. If I recall correctly, different versions of MySQL have different implementations of the password encryption function.
__________________
unban ^[a-zA-Z0-9]+$
tfinch2 is offline   Reply With Quote
Reply

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 06:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.