How can I correct MySQL Load Error

前端 未结 4 1289
面向向阳花
面向向阳花 2020-11-29 02:56

I\'m not quite sure a similar question to this was closed by I\'m trying to execute the following MySQL program.

mysql -e \"load data local infile \\
\'/tmp         


        
4条回答
  •  自闭症患者
    2020-11-29 03:43

    local-infile needs to enabled on both the server and the client. You can accomplish this by adding local-infile = 1 to the appropriate section in each end's my.cnf (Unix) or my.ini (Windows) file. For example, on the client:

    [client]
    local-infile = 1
    

    You can also enable this at runtime on the server by setting the system variable local_infile:

    SET GLOBAL local_infile=1;
    

    However, you still need to enable it on the client. You can do this at runtime by adding a command-line parameter to the mysql command:

    mysql --local-infile=1 ...
    

    If you're using Amazon Web Services RDS, you can configure the server setting by editing or creating a Parameter Group. Look for the local_infile parameter. You may need to restart your server after applying the changes.

提交回复
热议问题