问题:在安装moly论坛时出现错误
执行查询错误:
Insert INTO bbs_attachmenttype (id, extension, mimetype, usepost, useavatar, attachimg) VALUES ('', 'png', 'image/png', 1, 1, 'attach/quicktime.gif'), ('', 'gif', 'image/gif', 1, 1, 'attach/gif.gif'), ('', 'bmp', 'image/x-ms-bmp', 1, 0, 'attach/gif.gif'), ('', 'jpg', 'image/jpeg', 1, 1, 'attach/gif.gif'), ('', 'jpeg', 'image/jpeg', 1, 1, 'attach/gif.gif'), ('', 'tiff', 'image/tiff', 1, 0, 'attach/quicktime.gif'), ('', 'ico', 'image/ico', 1, 0, 'attach/gif.gif'), ('', 'wav', 'audio/x-wav', 1, 0, 'attach/music.gif'), ('', 'wmv', 'video/x-msvideo', 1, 0, 'attach/win_player.gif'), ('', 'ram', 'audio/x-pn-realaudio', 1, 0, 'attach/real_audio.gif'), ('', 'mov', 'video/quicktime', 1, 0, 'attach/quicktime.gif'), ('', 'mp3', 'audio/x-mpeg', 1, 0, 'attach/music.gif'), ('', 'mpg', 'video/mpeg', 1, 0, 'attach/quicktime.gif'), ('', 'swf', 'application/x-shockwave-flash', 0, 0, 'attach/flash.gif'), ('', 'htm', 'application/octet-stream', 1, 0, 'attach/html.gif'), ('', 'html', 'application/octet-stream', 1, 0, 'attach/html.gif'), ('', 'rtf', 'text/richtext', 1, 0, 'attach/rtf.gif'), ('', 'doc', 'application/msword', 1, 0, 'attach/doc.gif'), ('', 'txt', 'text/plain', 1, 0, 'attach/txt.gif'), ('', 'xml', 'text/xml', 1, 0, 'attach/script.gif'), ('', 'php', 'application/octet-stream', 1, 0, 'attach/php.gif'), ('', 'css', 'text/css', 1, 0, 'attach/script.gif'), ('', 'gz', 'application/x-gzip', 1, 0, 'attach/zip.gif'), ('', 'rar', 'application/rar', 1, 0, 'attach/zip.gif'), ('', 'tar', 'application/x-tar', 1, 0, 'attach/zip.gif'), ('', 'zip', 'application/zip', 1, 0, 'attach/zip.gif'), ('', 'torrent', 'application/x-bittorrent', 1, 0, 'attach/torrent.gif')
MySQL 返回结果: Out of range value adjusted for column 'id' at row 1
解决方法:
修改my.ini,将
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_Create_USER,NO_ENGINE_SUBSTITUTION"
改为
sql-mode="NO_AUTO_Create_USER,NO_ENGINE_SUBSTITUTION"。
重新启动MySQL。
文章评论