ERROR 1148: The used command is not allowed with this MySQL version

后端 未结 12 1311
感动是毒
感动是毒 2020-11-27 03:46

I am trying to load data into mysql database using

LOAD DATA LOCAL
INFILE A.txt
INTO DB
LINES TERMINATED BY \'|\';

the topic of this questi

12条回答
  •  天涯浪人
    2020-11-27 04:48

    You can specify that as an additional option when setting up your client connection:

    mysql -u myuser -p --local-infile somedatabase
    

    This is because that feature opens a security hole. So you have to enable it in an explicit manner in case you really want to use it.

    Both client and server should enable the local-file option. Otherwise it doesn't work.To enable it for files on the server side server add following to the my.cnf configuration file:

    loose-local-infile = 1
    

提交回复
热议问题