I have recently updated our MySQL server to MySQL 5.7.
Then I have found that in all the projects that has “SELECT DISTINCT and ORDER BY” SQL statements, are not working anymore.
In Order to Fix that I followed the below procedure:
Logged in To Server (CentOS 7).
In console mode typed
# mysqld –help –verbose
Then it gave something like that “/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf ”
So, now I know that mysql main configuration file is at “/etc/my.cnf/”
Then run again in the console mode:
# nano /etc/my.cnf
Then I updated it with:
Basically I added:
sql_mode = ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Then I restarted the MySQL server.
Hurray the Problem Solved.
I read similar article here: https://stackoverflow.com/questions/22806870/incorrect-datetime-value-database-error-number-1292
There are 0 comments