IBM developerWorks
           MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old September 28th, 1999, 10:42 AM
vbedceo
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I have been keeping my userID and passwords in .htaccess, .htpasswd files (apache authentication). I have just around 2,000 users registered and they need to log in to access my registered pages.

Now I have just last week installed mySQL database on my server. If I want to copy all existing users + passwords into a table in my mySQL database, how can I go about achieving this task?

Say my table's name is "userinfo" and I have just 2 fields - userID, password with userID being my PK.

Thanks much!

Reply With Quote
  #2  
Old September 28th, 1999, 11:13 AM
moderator
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Try this syntax:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
LOAD DATA INFILE "./.htpasswd" INTO TABLE userinfo FIELDS TERMINATED BY ':';
[/quote]

[This message has been edited by moderator (edited 09-28-99).]

Reply With Quote
  #3  
Old September 28th, 1999, 11:52 AM
vbedceo
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
So if my protected directory is "test" then it'd be : Am I right? (do I need to copy .htpasswd file from my protected page into the current directory in which my sql is ?)

LOAD DATA INFILE "/home/www/test/.htpasswd" INTO TABLE userinfo FIELDS userID, passwd TERMINATED BY ':';

Does the file have to be set in a specific format or the .htpasswd format (with | delimiter is fine by itself)?

Thanks.



Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > .htpasswd to mysql


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway