mysql
香椿遇上蛋
移动服务端php接口开发
展开
-
mysql8 Incorrect datetime value: '0000-00-00 00:00:00'
mysql8 Incorrect datetime value: ‘0000-00-00 00:00:00’导入数据报错:ERROR 1292 (22007) at line 101: Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘update_time’ at row 1解决方案去掉 sql_mode 里面的N...原创 2019-07-24 13:28:28 · 3451 阅读 · 0 评论 -
mysql8 导入数据乱码
mysql8 导入数据乱码因服务器迁移需要重新导数据,但是由于数据库乱码折腾了好久,泪崩……mysql8 默认字符集已修改为utf8mb4默认使用mysqldump导出数据会默认编码为utf8mb4解决方案:导出:mysqldump -uuser -p --default-character-set=utf8 dbname > dbname .sql导入:mysql -uus...原创 2019-07-23 14:02:57 · 761 阅读 · 0 评论 -
1064- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server
当使用navicat创建表为类型为datetime的字段设定默认值为**‘0000-00-00 00:00:00’**的时候报错:1064- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use...原创 2019-09-12 10:12:18 · 425 阅读 · 0 评论