I was trying to populate a mysql database from contents inside a csv files as follows, when I got the error 🙁
mysql>LOAD DATA LOCAL INFILE ‘/home/abc/public_html/test.csv’ into table test_list;
ERROR 1148 (42000): The used command is not allowed with this MySQL version
To correct it, I did the following.
1) Open my.cnf and added the line “local-infile=1” under [mysqld] and [mysql]
Save and quit the file.
2) Grant file privilege for the user
mysql> grant file on *.* to user@’localhost’;
mysql> flush privileges;
3) Restart mysql
Now try load data command again, and yes!!!!! it works 🙂 Read More