I'm running Mysql 5.5 on Ubuntu 12 LTS. How should I enable LOAD DATA LOCAL INFILE in my.cnf?
I've tried adding local-infile in my config at various places but I'm still getting the "The used command is not allowed with this MySQL version"
I'm running Mysql 5.5 on Ubuntu 12 LTS. How should I enable LOAD DATA LOCAL INFILE in my.cnf?
I've tried adding local-infile in my config at various places but I'm still getting the "The used command is not allowed with this MySQL version"
Another way is to use the
mysqlimport
client program.You invoke it as follows:
This generates a
LOAD DATA
statement which loadstableName.txt
into thetableName
table.Keep in mind the following:
mysqlimport
determines the table name from the file you provide; using all text from the start of the file name up to the first period as the table name. So, if you wish to load several files to the same table you could distinguish them liketableName.1.txt
,tableName.2.txt
,..., etc, for example.Ok, something odd is happening here. To make this work, do NOT need to make any configuration changes in /etc/mysql/my.cnf . All you need to do is to restart the current mysql service in terminal:
Then if I want to "recreate" the bug, I simply restart the apache service:
Which can then be fixed again by entering the following command:
So, it appears that the apache2 is doing something to not allow this feature when it starts up (which is then reversed/corrected if restart the mysql service).
Valid in Debian based distributions.
Valid in RedHat based distributions
Replace the driver php5-mysql by the native driver
On debian