|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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).] |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > .htpasswd to mysql |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|