LOAD DATA LOCAL INFILE gives the error The used command is not allowed with this MySQL version

后端 未结 3 1778
误落风尘
误落风尘 2020-11-27 06:23

I have a PHP script that calls MySQL\'s LOAD DATA INFILE to load data from CSV files. However, on production server, I ended up with the following error:

<
3条回答
  •  日久生厌
    2020-11-27 06:35

    I found that I need to connect to database like this:

    $dbh=mysql_connect($server,$dbuser,$dbpass,false,128);
    

    Passing 128 in the flags parameter is the key.

    See http://www.php.net/manual/en/mysql.constants.php#mysql.client-flags to read more about the flags.

提交回复
热议问题