Bob Williams wrote:
On Thursday 27 Jan 2011 15:56:35 Per Jessen wrote:
Bob Williams wrote:
On Thursday 27 Jan 2011 15:21:31 Per Jessen wrote:
Bob Williams wrote:
To the database gurus
I've just started exploring mysql (I'm a db newbie), and run into a 'feature'.
When I do LOAD DATA LOCAL INFILE '/path/to/file.txt' INTO TABLE mytable;
I get Error 1148: The used command is not allowed with this MySQL version
You probably need to start mysql with '--load-infile'.
Yes, I tried that,
mysql --load-infile -u root -p
but it's an 'unknown option' :(
Yes, for the mysql _client_, but you need to start the mysql _server_ with that option. This means editing /etc/init.d/mysql or stopping and starting the server manually.
Ah. OK
Alternatively, you prepare INSERT sql statements in a file and process
those using mysql -u <user> -p -D<database>