Restore error because of sql_mode

Anne

Verified User
Joined
Dec 3, 2015
Messages
72
Hi,

I don't want MariaDB to run in strict mode so I've added:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
to: etc/my.cnf

This works, but the downside is I can't backup or restore without getting an empty database and errors like:

Unable to restore database dbexample.sql to dbexample : /usr/bin/mysql: unknown variable 'sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'

Any thoughts what to do?
 
It’s not in [mysqld] section, thus have no effect for the actual sql_mode :)
 
Thanks smtalk I think I see what you are pointing at.

In the meantime I was reading up to the Stric mode and decided to just fix some things like default column values and the application will run without problems. As I see the strict mode will be the standard anyway, probably better to go along with it and not run into these issues.
 
Back
Top