Strict mode is enabled by using STRICT_TRANS_TABLES and STRICT_ALL_TABLES.

SET sql_mode = 'STRICT_ALL_TABLES,NO_ZERO_DATE,NO_ZERO_IN_DATE';
SET sql_mode = 'TRADITIONAL';

STRICT_TRANS_TABLES:
If an error occurs for a transactional table, the statement rolls back. For a non-transactional table, the statement could be adjusted by MySQL if possible. (partial updates might occur)

STRICT_ALL_TABLES:
Similar to STRICT_TRANS_TABLES but the statement could be aborted for a non-transactional table. (partial updates might occur)

Additional Input Data Restrictions:
ERROR_FOR_DIVISION_BY_ZERO
* If no strict mode, division by zero results in a value of NULL and a warning, not an error.
NO_ZERO_DATE, NO_ZERO_IN_DATE
* By default, MySQL allows "zero" dates even if you enable strict mode.
TRADITIONAL
* Strict mode plus above additional restrictions