November 16

check the Strict mode in MySql

to check it execute the query in MySQL:

SHOW VARIABLES LIKE 'sql_mode';

if enabled it will be something like this:

MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode';
+-------------------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode |
+-------------------------------------------------------------------------------------------------------------------------------------+
| IGNORE_SPACE,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------+

if the Strict mode is disabled you will see an empty response.

if you want to disable it, just add the following like to file /etc/my.cnf inside [mysqld] section the following sql_mode=''


Copyright 2021. All rights reserved.

Posted 16 November 2018 by admin in category "simple memo

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.