I have installed a new AWS RDS MariaDB, imported all my tables and it's up and running. In my old DB I did not have STRICT_TRANS_TABLES
set so I have to go through all my tables and modify the columns to specify null values. Until then I want to disable STRICT_TRANS_TABLES
for now so I can test things and later I can add it back.
I was able to modify the @@SESSION
SQL mode just fine but I am still not able to insert records because some of the inserts are null so I am assuming the @@GLOBAL
is still superseding the @@SESSION
SQL modes.
I am using MySQL Workbench to access my RDS and when I try and use SET GLOBAL sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
but I get Error Code: 1227. Access denied; you need (at least one of) the SUPER privilege(s) for this operation
.
Is there any way for me to modify the @@GLOBAL
SQL mode with AWS RDS and am I correct that @@GLOBAL
is superseding @@SESSION
SQL mode?
UPDATE
I have been able to get around this executing this query whenever a connection is made to my DB, but is there a more permanent way of doing this?
mysqli_query($conn, "SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION'");