If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Importing data to MySQL 4.0.22

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-19-04, 06:31
john woodbridge john woodbridge is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
Importing data to MySQL 4.0.22

I am a MySQP newbie, in the process of moving from Access and .asp to PHP MySQL.

I have created some tables and need to be able to import my data from Access to MySQL. I am using phpMyAdmin and trying to use the import from text file utility (having exported the data from Access to a text file). When I do so I am getting this error message. "#1148 - The used command is not allowed with this MySQL version". The query that it is running is

LOAD DATA LOCAL INFILE 'C:\\WINDOWS\\TEMP\\php8B.tmp' INTO TABLE `tblmembers` FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'

I have to be able to import my old data into MySQL so am seriously worried that I appear not to be able to import data. What version does support data import if 4.0.22 really does not allow it?

Any help gratefully received.

Thanks

John
Reply With Quote
  #2 (permalink)  
Old 12-19-04, 19:04
yellowmarker yellowmarker is offline
Registered User
 
Join Date: Jul 2004
Location: Dundee, Scotland
Posts: 107
let's see if there are any leads in the manual..


http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html
"LOCAL is available in MySQL 3.22.6 or later. "
... this indicates that the function is available prior to version 4.0.22

"For security reasons, when reading text files located on the server, the files must either reside in the database directory or be readable by all. Also, to use LOAD DATA INFILE on server files, you must have the FILE privilege. See section 5.5.3 Privileges Provided by MySQL. "
... can you exclude this as a possibility?

http://dev.mysql.com/doc/mysql/en/mysqlimport.html
"The mysqlimport client provides a command-line interface to the LOAD DATA INFILE SQL statement. Most options to mysqlimport correspond directly to clauses of LOAD DATA INFILE. "
... have you tried running a command-line alternative?

are there any date fields in the export file? Are they formatted as YYYY-MM-DD?

I wrote a little overview article on this which can be found here:
http://www.yellowmarker.co.uk/index...._data_to_mysql
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On