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:
LOAD DATA INFILE
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.
128
See http://www.php.net/manual/en/mysql.constants.php#mysql.client-flags to read more about the flags.