SHARE
TWEET

Untitled

a guest Jul 16th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. select * from table
  2. >> Mysql2::Error: Invalid date: 1900-00-00
  3.      
  4. mysql --version
  5. mysql  Ver 14.14 Distrib 5.1.61, for debian-linux-gnu (i686) using readline 6.1
  6.  
  7. mysql> select @@global.sql_mode;
  8. +-------------------+
  9. | @@global.sql_mode |
  10. +-------------------+
  11. |                   |
  12.      
  13. SET SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
  14.      
  15. set global sql_mode="NO_ENGINE_SUBSTITUTION";
  16.      
  17. [mysqld]
  18. sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ALLOW_INVALID_DATES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
  19.      
  20. sudo service mysql restart
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top