Reputation: 2493
In my project I have to connect my Rails app to old MySQL server(v4) with readonly access. I have third-party application there. Unfortunately I cannot change this situation. The problem is when I try to connect there I get an exception:
ActionController:Variable 'sql_mode' can't be set to the value of 'STRICT_ALL_TABLES'
Here is my database.yml file
development:
adapter: mysql2
encoding: utf8
database: td
pool: 5
username: user
password: password
host: 10.12.12.12
I can connect to this DB with any DB client, but not with Rails app. How to fix it?
Upvotes: 0
Views: 1075
Reputation: 2493
Adding
strict: false
to the connector settings in database.yml solved the problem.
Upvotes: 6