Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    1

    Unanswered: 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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •