mercredi 13 juillet 2016
How do I change the MySQL sql_mode to '' (empty string) via PHP?
Using MySQL 5.7, I have tried the following, none have worked:
A symbolic link in /etc/mysql/conf.d AND /etc/mysql/mysqlconf.d with the following: (Why are there two directories!??!)
[mysqld]
sql-mode=""
And each of these lines in the PHP code after every single new mysqli()
$databaseLink->set_opt("sql_mode", "");
or
$databaseLink->query("SET GLOBAL sql_mode="";");
or
$databaseLink->options(MYSQLI_INIT_COMMAND, "SET GLOBAL SQL_MODE=""");
I'm dying, i'm spending hours trying to set one effing variable. I've purged and I've deleted all my conf files and re-installed mysql.
BTW, it does work if I do:
$ sudo mysql -u root
SET GLOBAL sql_mode = "";
SELECT @@sql_mode;
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire