We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
假如没有使用bobo老师实验中的MySQL5.6 ,而是使用了5.7及以上,可能报Error 1067: Invalid default value for 'expires_at'
问题解析:是高版本的SQL模式默认不允许NO_ZERO_IN_DATE,NO_ZERO_DATE,如下: mysql> show variables like 'sql_mode' ; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
可以通过: SET GLOBAL sql_mode = ''; 然后,重新来一遍数据库导入。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
假如没有使用bobo老师实验中的MySQL5.6 ,而是使用了5.7及以上,可能报Error 1067: Invalid default value for 'expires_at'
问题解析:是高版本的SQL模式默认不允许NO_ZERO_IN_DATE,NO_ZERO_DATE,如下:
mysql> show variables like 'sql_mode' ;
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
可以通过:
SET GLOBAL sql_mode = '';
然后,重新来一遍数据库导入。
The text was updated successfully, but these errors were encountered: