Reputation: 7393
Is there a way to enable STRICT_ALL_TABLES for a single MySQL database?
Upvotes: 5
Views: 5949
Reputation: 2025
You can set the default SQL mode by starting mysqld with the --sql-mode="modes" option, or by using sql-mode="modes" in my.cnf (Unix operating systems) or my.ini (Windows). modes is a list of different modes separated by comma (“,”) characters. The default value is empty (no modes set). The modes value also can be empty (--sql-mode="" on the command line, or sql-mode="" in my.cnf on Unix systems or in my.ini on Windows) if you want to clear it explicitly.
ref MySql Website
Upvotes: 1
Reputation: 1287
Don't think you can do this directly but you might get close with setting Strict for the current session when working on a particular database. Could do this in the config files of specific users.
Upvotes: 0