转移wordpress数据库后不能添加文章的一次查错
前几日转移了一个wordpress博客, 用phpadmin导出了数据库, 然后在新的数据库服务器上执行sql导入数据库.
重新安装wordpress后, 一切正常. 但隔日发现无法发布文章, 也无法上传图片.
3389服务器, 通过调试php文件, 逐级die测试, 最终把错误锚定在posts表的insert语句执行上.
执行以后wpdb产生一个隐藏的错误
Field ‘post_mime_type’ doesn’t have a default value
打开数据库后发现, post_mime_type本应有一个”默认值的, 现在却没有了. 同时发现该表的其他若干字段的默认值也丢失了.
修改默认值后, 问题解决.
对于默认值的丢失是导出数据库时设置不当, 还是phpadmin或mysql本身的问题, 目前还在查找中.
贴出此文, 希望对遇到同类问题的朋友有所帮助.
You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.