Is the mode dependent on the Database or the Connection?
A mode is not 'linked' to a particular database. Modes can be set locally to the session (connection), or globally for the server With SET [SESSION|GLOBAL] sql_mode='modes' you can change the settings.