KiamOe
Basic Pleskian
New
Hi I hope you can help me out here..
After upgrading from Mysql 5.5.56 to Mariadb 10.2.17 I have a problem with on old php application. It reports "Error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'deleted' doesn't have a default value" and from looking around I understand the problem is related to "Strict SQL Mode". I have read thread here but I can't seem to solve it. I have put sql_mode="" into /etc/my.cnf restarted mysql but I still get the same result:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "SELECT @@sql_mode;"
+-------------------------------------------------------------------------------------------+
| @@sql_mode |
+-------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------+
This is my files:
locate my.cnf
/my.cnf
/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.rpmnew
/etc/my.cnf.d/enable_encryption.preset
/etc/my.cnf.d/mysql-clients.cnf
/etc/my.cnf.d/server.cnf
/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
I get no result searching for files with sql_mode set (grep -rnw '/etc' -e "sql_mode")
How can I fix this? What config file should I update? Or better do it via sql in phpmyadmin?
Thanks!
Hi I hope you can help me out here..
After upgrading from Mysql 5.5.56 to Mariadb 10.2.17 I have a problem with on old php application. It reports "Error: [PDOException] SQLSTATE[HY000]: General error: 1364 Field 'deleted' doesn't have a default value" and from looking around I understand the problem is related to "Strict SQL Mode". I have read thread here but I can't seem to solve it. I have put sql_mode="" into /etc/my.cnf restarted mysql but I still get the same result:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "SELECT @@sql_mode;"
+-------------------------------------------------------------------------------------------+
| @@sql_mode |
+-------------------------------------------------------------------------------------------+
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------+
This is my files:
locate my.cnf
/my.cnf
/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.rpmnew
/etc/my.cnf.d/enable_encryption.preset
/etc/my.cnf.d/mysql-clients.cnf
/etc/my.cnf.d/server.cnf
/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
I get no result searching for files with sql_mode set (grep -rnw '/etc' -e "sql_mode")
How can I fix this? What config file should I update? Or better do it via sql in phpmyadmin?
Thanks!