Hi Michael,

Thanks. I rechecked things but

porkribs /u2/lcscreative/sql_scripts $ mysql --local-infile -u davidl -p
<make_web_tables.sql
Enter password:
ERROR 1148 at line 46: The used command is not allowed with this MySQL
version

Still a most unhappy camper. I had to resort to placing the file on the
server, owned and group mysql in the datadir before it would work. Even
though I did chmod 777 on the file, it was still upset.

I am running Solaris 8 on the client and 9 on the server. I don't know
whether this would make a difference, I can't understand why it would.

Regards

David Logan
Database Administrator
HP Managed Services
139 Frome Street,
Adelaide 5000
Australia

+61 8 8408 4273 - Work
+61 417 268 665 - Mobile
+61 8 8408 4259 - Fax



-----Original Message-----
From: Michael Stassen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 10 August 2004 2:37 PM
To: Logan, David (SST - Adelaide)
Cc: MySQL List
Subject: Re: LOAD DATA LOCAL INFILE issue


Perhaps the problem is that there is no such option as
--enable-local-infile 
in the mysql client.  I believe you want --local-infile.  Client options
are 
detailed in the manual <http://dev.mysql.com/doc/mysql/en/mysql.html>.

Michael

Logan, David (SST - Adelaide) wrote:

> Hi Folks,
> 
> I am having a few issues with a LOAD DATA LOCAL INFILE command. As you
> can see by the command below, I am receiving an error 1148. The
> documentation states this is generally because I don't have
> --enable-local-infile on in both client and server. I have switched it
> on via command line below and when I do a show variables on the
server,
> I see local-infile = ON. I have also tried loose-local-infile in the
> my.cnf on both client and server. I have just rebuilt the server
> ensuring --enable-local-infile was in the ./configure options.
> 
> Both client and server are version 4.0.20 and are on different hosts.
> The sql file I am using is
> 
> CREATE DATABASE IF NOT EXISTS weblog;
> 
> use weblog;
> 
> CREATE TABLE IF NOT EXISTS dept
>         (department INT PRIMARY KEY,
>          main_dept INT NOT NULL,
>          description VARCHAR(40));
> 
> CREATE TABLE IF NOT EXISTS dns_cache
>         (ip_address CHAR(15) NOT NULL PRIMARY KEY,
>          hostname VARCHAR(255));
> 
> CREATE TABLE IF NOT EXISTS web_rec
>         (recnum INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
>          date DATE NOT NULL,
>          time TIME NOT NULL,
>          source_ip CHAR(15) NOT NULL,
>          method CHAR(10) NOT NULL,
>          department INT,
>          source_port SMALLINT NOT NULL,
>          username VARCHAR(255),
>          c_ip CHAR(15),
>          user_agent VARCHAR(255),
>          referrer TEXT,
>          last_status SMALLINT,
>          last_substatus SMALLINT,
>          win32_status SMALLINT,
>          sent_bytes INT,
>          recv_bytes INT);
> 
> CREATE TABLE IF NOT EXISTS UserAgent
>         (agentnum INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
>          browser VARCHAR(255),
>          description VARCHAR(255));
> 
> CREATE TABLE IF NOT EXISTS Referrer
>         (Refnum INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
>          ref_uri VARCHAR(255),
>          hostname VARCHAR(255));
> 
> CREATE TABLE IF NOT EXISTS status
>         (status INT NOT NULL PRIMARY KEY,
>          description VARCHAR(255));
> 
> LOAD DATA LOCAL INFILE '/u2/lcscreative/sql_scripts/categories.csv'
<---
> Line 46, error 1148 occurs here
> INTO TABLE dept
> FIELDS TERMINATED BY ',' ENCLOSED BY '"'
> (main_dept,department,description);
> 
> porkribs /u2/lcscreative/sql_scripts $ mysql --enable-local-infile -u
> davidl -p <make_web_tables.sql
> Enter password:
> ERROR 1148 at line 46: The used command is not allowed with this MySQL
> version
> porkribs /u2/lcscreative/sql_scripts $
> 
> Anybody have any ideas on what I've done wrong?
> 
> Regards
> 
> David Logan
> Database Administrator
> HP Managed Services
> 139 Frome Street,
> Adelaide 5000
> Australia
> 
> +61 8 8408 4273 - Work
> +61 417 268 665 - Mobile
> +61 8 8408 4259 - Fax
> 
> 
> 


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to