找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 3674|回复: 1

将discuz数据表存储引擎从MYISAM转换成INNODB最全方法

[复制链接]
发表于 2020-3-14 21:58:26 | 显示全部楼层 |阅读模式

笑脸喜迎新飞吧友,热情拥抱新伙伴。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
目前官方Discuz是不支持mysql的innodb的,所以安装到innodb数据库时,会有两个表run_sql_error(pre_common_member_grouppm,pre_forum_post),Error:Incorrect table definition; there can be only one auto column and it must be defined as a key


使用的方法:登录后台---站长----数据库----升级,把下面的代码复制到里面转化成innodb格式,提交就可以。

  1. ALTER TABLE pre_forum_post
  2.     MODIFY COLUMN position INT unsigned NOT NULL DEFAULT '0';

  3. ALTER TABLE pre_common_member_grouppm
  4.     ADD INDEX gpmid(gpmid);

  5. ALTER TABLE pre_common_admincp_cmenu ENGINE=innodb;
  6. ALTER TABLE pre_common_admincp_group ENGINE=innodb;
  7. ALTER TABLE pre_common_admincp_member ENGINE=innodb;
  8. ALTER TABLE pre_common_admincp_perm ENGINE=innodb;
  9. ALTER TABLE pre_common_admincp_session ENGINE=innodb;
  10. ALTER TABLE pre_common_admingroup ENGINE=innodb;
  11. ALTER TABLE pre_common_adminnote ENGINE=innodb;
  12. ALTER TABLE pre_common_advertisement ENGINE=innodb;
  13. ALTER TABLE pre_common_advertisement_custom ENGINE=innodb;
  14. ALTER TABLE pre_common_banned ENGINE=innodb;
  15. ALTER TABLE pre_common_block ENGINE=innodb;
  16. ALTER TABLE pre_common_block_favorite ENGINE=innodb;
  17. ALTER TABLE pre_common_block_item ENGINE=innodb;
  18. ALTER TABLE pre_common_block_item_data ENGINE=innodb;
  19. ALTER TABLE pre_common_block_permission ENGINE=innodb;
  20. ALTER TABLE pre_common_block_pic ENGINE=innodb;
  21. ALTER TABLE pre_common_block_style ENGINE=innodb;
  22. ALTER TABLE pre_common_block_xml ENGINE=innodb;
  23. ALTER TABLE pre_common_cache ENGINE=innodb;
  24. ALTER TABLE pre_common_card ENGINE=innodb;
  25. ALTER TABLE pre_common_card_log ENGINE=innodb;
  26. ALTER TABLE pre_common_card_type ENGINE=innodb;
  27. ALTER TABLE pre_common_connect_guest ENGINE=innodb;
  28. ALTER TABLE pre_common_credit_log ENGINE=innodb;
  29. ALTER TABLE pre_common_credit_log_field ENGINE=innodb;
  30. ALTER TABLE pre_common_credit_rule ENGINE=innodb;
  31. ALTER TABLE pre_common_credit_rule_log ENGINE=innodb;
  32. ALTER TABLE pre_common_credit_rule_log_field ENGINE=innodb;
  33. ALTER TABLE pre_common_cron ENGINE=innodb;
  34. ALTER TABLE pre_common_devicetoken ENGINE=innodb;
  35. ALTER TABLE pre_common_district ENGINE=innodb;
  36. ALTER TABLE pre_common_diy_data ENGINE=innodb;
  37. ALTER TABLE pre_common_domain ENGINE=innodb;
  38. ALTER TABLE pre_common_failedip ENGINE=innodb;
  39. ALTER TABLE pre_common_failedlogin ENGINE=innodb;
  40. ALTER TABLE pre_common_friendlink ENGINE=innodb;
  41. ALTER TABLE pre_common_grouppm ENGINE=innodb;
  42. ALTER TABLE pre_common_invite ENGINE=innodb;
  43. ALTER TABLE pre_common_magic ENGINE=innodb;
  44. ALTER TABLE pre_common_magiclog ENGINE=innodb;
  45. ALTER TABLE pre_common_mailcron ENGINE=innodb;
  46. ALTER TABLE pre_common_mailqueue ENGINE=innodb;
  47. ALTER TABLE pre_common_member ENGINE=innodb;
  48. ALTER TABLE pre_common_member_action_log ENGINE=innodb;
  49. ALTER TABLE pre_common_member_connect ENGINE=innodb;
  50. ALTER TABLE pre_common_member_count ENGINE=innodb;
  51. ALTER TABLE pre_common_member_crime ENGINE=innodb;
  52. ALTER TABLE pre_common_member_field_forum ENGINE=innodb;
  53. ALTER TABLE pre_common_member_field_home ENGINE=innodb;
  54. ALTER TABLE pre_common_member_forum_buylog ENGINE=innodb;
  55. ALTER TABLE pre_common_member_grouppm ENGINE=innodb;
  56. ALTER TABLE pre_common_member_log ENGINE=innodb;
  57. ALTER TABLE pre_common_member_magic ENGINE=innodb;
  58. ALTER TABLE pre_common_member_medal ENGINE=innodb;
  59. ALTER TABLE pre_common_member_newprompt ENGINE=innodb;
  60. ALTER TABLE pre_common_member_profile ENGINE=innodb;
  61. ALTER TABLE pre_common_member_profile_setting ENGINE=innodb;
  62. ALTER TABLE pre_common_member_security ENGINE=innodb;
  63. -- ALTER TABLE pre_common_member_secwhite ENGINE=innodb;
  64. ALTER TABLE pre_common_member_stat_field ENGINE=innodb;
  65. ALTER TABLE pre_common_member_status ENGINE=innodb;
  66. ALTER TABLE pre_common_member_validate ENGINE=innodb;
  67. ALTER TABLE pre_common_member_verify ENGINE=innodb;
  68. ALTER TABLE pre_common_member_verify_info ENGINE=innodb;
  69. ALTER TABLE pre_common_myapp ENGINE=innodb;
  70. ALTER TABLE pre_common_myinvite ENGINE=innodb;
  71. ALTER TABLE pre_common_mytask ENGINE=innodb;
  72. ALTER TABLE pre_common_nav ENGINE=innodb;
  73. ALTER TABLE pre_common_onlinetime ENGINE=innodb;
  74. ALTER TABLE pre_common_optimizer ENGINE=innodb;
  75. ALTER TABLE pre_common_patch ENGINE=innodb;
  76. ALTER TABLE pre_common_plugin ENGINE=innodb;
  77. ALTER TABLE pre_common_pluginvar ENGINE=innodb;
  78. -- ALTER TABLE pre_common_process ENGINE=innodb;
  79. ALTER TABLE pre_common_regip ENGINE=innodb;
  80. ALTER TABLE pre_common_relatedlink ENGINE=innodb;
  81. ALTER TABLE pre_common_remote_port ENGINE=innodb;
  82. ALTER TABLE pre_common_report ENGINE=innodb;
  83. ALTER TABLE pre_common_searchindex ENGINE=innodb;
  84. -- ALTER TABLE pre_common_seccheck ENGINE=innodb;
  85. ALTER TABLE pre_common_secquestion ENGINE=innodb;
  86. -- ALTER TABLE pre_common_session ENGINE=innodb;
  87. ALTER TABLE pre_common_setting ENGINE=innodb;
  88. ALTER TABLE pre_common_smiley ENGINE=innodb;
  89. ALTER TABLE pre_common_sphinxcounter ENGINE=innodb;
  90. ALTER TABLE pre_common_stat ENGINE=innodb;
  91. ALTER TABLE pre_common_statuser ENGINE=innodb;
  92. ALTER TABLE pre_common_style ENGINE=innodb;
  93. ALTER TABLE pre_common_stylevar ENGINE=innodb;
  94. ALTER TABLE pre_common_syscache ENGINE=innodb;
  95. ALTER TABLE pre_common_tag ENGINE=innodb;
  96. ALTER TABLE pre_common_tagitem ENGINE=innodb;
  97. ALTER TABLE pre_common_task ENGINE=innodb;
  98. ALTER TABLE pre_common_taskvar ENGINE=innodb;
  99. ALTER TABLE pre_common_template ENGINE=innodb;
  100. ALTER TABLE pre_common_template_block ENGINE=innodb;
  101. ALTER TABLE pre_common_template_permission ENGINE=innodb;
  102. ALTER TABLE pre_common_uin_black ENGINE=innodb;
  103. ALTER TABLE pre_common_usergroup ENGINE=innodb;
  104. ALTER TABLE pre_common_usergroup_field ENGINE=innodb;
  105. -- ALTER TABLE pre_common_visit ENGINE=innodb;
  106. ALTER TABLE pre_common_word ENGINE=innodb;
  107. ALTER TABLE pre_common_word_type ENGINE=innodb;
  108. ALTER TABLE pre_connect_disktask ENGINE=innodb;
  109. ALTER TABLE pre_connect_feedlog ENGINE=innodb;
  110. ALTER TABLE pre_connect_memberbindlog ENGINE=innodb;
  111. ALTER TABLE pre_connect_postfeedlog ENGINE=innodb;
  112. ALTER TABLE pre_connect_tthreadlog ENGINE=innodb;
  113. ALTER TABLE pre_forum_access ENGINE=innodb;
  114. ALTER TABLE pre_forum_activity ENGINE=innodb;
  115. ALTER TABLE pre_forum_activityapply ENGINE=innodb;
  116. ALTER TABLE pre_forum_announcement ENGINE=innodb;
  117. ALTER TABLE pre_forum_attachment ENGINE=innodb;
  118. ALTER TABLE pre_forum_attachment_0 ENGINE=innodb;
  119. ALTER TABLE pre_forum_attachment_1 ENGINE=innodb;
  120. ALTER TABLE pre_forum_attachment_2 ENGINE=innodb;
  121. ALTER TABLE pre_forum_attachment_3 ENGINE=innodb;
  122. ALTER TABLE pre_forum_attachment_4 ENGINE=innodb;
  123. ALTER TABLE pre_forum_attachment_5 ENGINE=innodb;
  124. ALTER TABLE pre_forum_attachment_6 ENGINE=innodb;
  125. ALTER TABLE pre_forum_attachment_7 ENGINE=innodb;
  126. ALTER TABLE pre_forum_attachment_8 ENGINE=innodb;
  127. ALTER TABLE pre_forum_attachment_9 ENGINE=innodb;
  128. ALTER TABLE pre_forum_attachment_exif ENGINE=innodb;
  129. ALTER TABLE pre_forum_attachment_unused ENGINE=innodb;
  130. ALTER TABLE pre_forum_attachtype ENGINE=innodb;
  131. ALTER TABLE pre_forum_bbcode ENGINE=innodb;
  132. ALTER TABLE pre_forum_collection ENGINE=innodb;
  133. ALTER TABLE pre_forum_collectioncomment ENGINE=innodb;
  134. ALTER TABLE pre_forum_collectionfollow ENGINE=innodb;
  135. ALTER TABLE pre_forum_collectioninvite ENGINE=innodb;
  136. ALTER TABLE pre_forum_collectionrelated ENGINE=innodb;
  137. ALTER TABLE pre_forum_collectionteamworker ENGINE=innodb;
  138. ALTER TABLE pre_forum_collectionthread ENGINE=innodb;
  139. ALTER TABLE pre_forum_creditslog ENGINE=innodb;
  140. ALTER TABLE pre_forum_debate ENGINE=innodb;
  141. ALTER TABLE pre_forum_debatepost ENGINE=innodb;
  142. ALTER TABLE pre_forum_faq ENGINE=innodb;
  143. ALTER TABLE pre_forum_filter_post ENGINE=innodb;
  144. ALTER TABLE pre_forum_forum ENGINE=innodb;
  145. ALTER TABLE pre_forum_forum_threadtable ENGINE=innodb;
  146. ALTER TABLE pre_forum_forumfield ENGINE=innodb;
  147. ALTER TABLE pre_forum_forumrecommend ENGINE=innodb;
  148. ALTER TABLE pre_forum_groupcreditslog ENGINE=innodb;
  149. ALTER TABLE pre_forum_groupfield ENGINE=innodb;
  150. ALTER TABLE pre_forum_groupinvite ENGINE=innodb;
  151. ALTER TABLE pre_forum_grouplevel ENGINE=innodb;
  152. ALTER TABLE pre_forum_groupuser ENGINE=innodb;
  153. ALTER TABLE pre_forum_hotreply_member ENGINE=innodb;
  154. ALTER TABLE pre_forum_hotreply_number ENGINE=innodb;
  155. ALTER TABLE pre_forum_imagetype ENGINE=innodb;
  156. ALTER TABLE pre_forum_medal ENGINE=innodb;
  157. ALTER TABLE pre_forum_medallog ENGINE=innodb;
  158. ALTER TABLE pre_forum_memberrecommend ENGINE=innodb;
  159. ALTER TABLE pre_forum_moderator ENGINE=innodb;
  160. ALTER TABLE pre_forum_modwork ENGINE=innodb;
  161. ALTER TABLE pre_forum_newthread ENGINE=innodb;
  162. ALTER TABLE pre_forum_onlinelist ENGINE=innodb;
  163. ALTER TABLE pre_forum_order ENGINE=innodb;
  164. ALTER TABLE pre_forum_poll ENGINE=innodb;
  165. ALTER TABLE pre_forum_polloption ENGINE=innodb;
  166. ALTER TABLE pre_forum_polloption_image ENGINE=innodb;
  167. ALTER TABLE pre_forum_pollvoter ENGINE=innodb;
  168. ALTER TABLE pre_forum_post ENGINE=innodb;
  169. ALTER TABLE pre_forum_post_location ENGINE=innodb;
  170. ALTER TABLE pre_forum_post_moderate ENGINE=innodb;
  171. ALTER TABLE pre_forum_post_tableid ENGINE=innodb;
  172. ALTER TABLE pre_forum_postcache ENGINE=innodb;
  173. ALTER TABLE pre_forum_postcomment ENGINE=innodb;
  174. ALTER TABLE pre_forum_postlog ENGINE=innodb;
  175. ALTER TABLE pre_forum_poststick ENGINE=innodb;
  176. ALTER TABLE pre_forum_promotion ENGINE=innodb;
  177. ALTER TABLE pre_forum_ratelog ENGINE=innodb;
  178. ALTER TABLE pre_forum_relatedthread ENGINE=innodb;
  179. ALTER TABLE pre_forum_replycredit ENGINE=innodb;
  180. ALTER TABLE pre_forum_rsscache ENGINE=innodb;
  181. ALTER TABLE pre_forum_sofa ENGINE=innodb;
  182. ALTER TABLE pre_forum_spacecache ENGINE=innodb;
  183. ALTER TABLE pre_forum_statlog ENGINE=innodb;
  184. ALTER TABLE pre_forum_thread ENGINE=innodb;
  185. ALTER TABLE pre_forum_thread_moderate ENGINE=innodb;
  186. ALTER TABLE pre_forum_threadaddviews ENGINE=innodb;
  187. ALTER TABLE pre_forum_threadcalendar ENGINE=innodb;
  188. ALTER TABLE pre_forum_threadclass ENGINE=innodb;
  189. ALTER TABLE pre_forum_threadclosed ENGINE=innodb;
  190. -- ALTER TABLE pre_forum_threaddisablepos ENGINE=innodb;
  191. ALTER TABLE pre_forum_threadhidelog ENGINE=innodb;
  192. ALTER TABLE pre_forum_threadhot ENGINE=innodb;
  193. ALTER TABLE pre_forum_threadimage ENGINE=innodb;
  194. ALTER TABLE pre_forum_threadlog ENGINE=innodb;
  195. ALTER TABLE pre_forum_threadmod ENGINE=innodb;
  196. ALTER TABLE pre_forum_threadpartake ENGINE=innodb;
  197. ALTER TABLE pre_forum_threadpreview ENGINE=innodb;
  198. ALTER TABLE pre_forum_threadprofile ENGINE=innodb;
  199. ALTER TABLE pre_forum_threadprofile_group ENGINE=innodb;
  200. ALTER TABLE pre_forum_threadrush ENGINE=innodb;
  201. ALTER TABLE pre_forum_threadtype ENGINE=innodb;
  202. ALTER TABLE pre_forum_trade ENGINE=innodb;
  203. ALTER TABLE pre_forum_tradecomment ENGINE=innodb;
  204. ALTER TABLE pre_forum_tradelog ENGINE=innodb;
  205. ALTER TABLE pre_forum_typeoption ENGINE=innodb;
  206. ALTER TABLE pre_forum_typeoptionvar ENGINE=innodb;
  207. ALTER TABLE pre_forum_typevar ENGINE=innodb;
  208. ALTER TABLE pre_forum_warning ENGINE=innodb;
  209. ALTER TABLE pre_home_album ENGINE=innodb;
  210. ALTER TABLE pre_home_album_category ENGINE=innodb;
  211. ALTER TABLE pre_home_appcreditlog ENGINE=innodb;
  212. ALTER TABLE pre_home_blacklist ENGINE=innodb;
  213. ALTER TABLE pre_home_blog ENGINE=innodb;
  214. ALTER TABLE pre_home_blog_category ENGINE=innodb;
  215. ALTER TABLE pre_home_blog_moderate ENGINE=innodb;
  216. ALTER TABLE pre_home_blogfield ENGINE=innodb;
  217. ALTER TABLE pre_home_class ENGINE=innodb;
  218. ALTER TABLE pre_home_click ENGINE=innodb;
  219. ALTER TABLE pre_home_clickuser ENGINE=innodb;
  220. ALTER TABLE pre_home_comment ENGINE=innodb;
  221. ALTER TABLE pre_home_comment_moderate ENGINE=innodb;
  222. ALTER TABLE pre_home_docomment ENGINE=innodb;
  223. ALTER TABLE pre_home_doing ENGINE=innodb;
  224. ALTER TABLE pre_home_doing_moderate ENGINE=innodb;
  225. ALTER TABLE pre_home_favorite ENGINE=innodb;
  226. ALTER TABLE pre_home_feed ENGINE=innodb;
  227. ALTER TABLE pre_home_feed_app ENGINE=innodb;
  228. ALTER TABLE pre_home_follow ENGINE=innodb;
  229. ALTER TABLE pre_home_follow_feed ENGINE=innodb;
  230. ALTER TABLE pre_home_follow_feed_archiver ENGINE=innodb;
  231. ALTER TABLE pre_home_friend ENGINE=innodb;
  232. ALTER TABLE pre_home_friend_request ENGINE=innodb;
  233. ALTER TABLE pre_home_friendlog ENGINE=innodb;
  234. ALTER TABLE pre_home_notification ENGINE=innodb;
  235. ALTER TABLE pre_home_pic ENGINE=innodb;
  236. ALTER TABLE pre_home_pic_moderate ENGINE=innodb;
  237. ALTER TABLE pre_home_picfield ENGINE=innodb;
  238. ALTER TABLE pre_home_poke ENGINE=innodb;
  239. ALTER TABLE pre_home_pokearchive ENGINE=innodb;
  240. ALTER TABLE pre_home_share ENGINE=innodb;
  241. ALTER TABLE pre_home_share_moderate ENGINE=innodb;
  242. ALTER TABLE pre_home_show ENGINE=innodb;
  243. ALTER TABLE pre_home_specialuser ENGINE=innodb;
  244. ALTER TABLE pre_home_userapp ENGINE=innodb;
  245. ALTER TABLE pre_home_userappfield ENGINE=innodb;
  246. ALTER TABLE pre_home_visitor ENGINE=innodb;
  247. ALTER TABLE pre_mobile_setting ENGINE=innodb;
  248. ALTER TABLE pre_mobile_wsq_threadlist ENGINE=innodb;
  249. ALTER TABLE pre_portal_article_content ENGINE=innodb;
  250. ALTER TABLE pre_portal_article_count ENGINE=innodb;
  251. ALTER TABLE pre_portal_article_moderate ENGINE=innodb;
  252. ALTER TABLE pre_portal_article_related ENGINE=innodb;
  253. ALTER TABLE pre_portal_article_title ENGINE=innodb;
  254. ALTER TABLE pre_portal_article_trash ENGINE=innodb;
  255. ALTER TABLE pre_portal_attachment ENGINE=innodb;
  256. ALTER TABLE pre_portal_category ENGINE=innodb;
  257. ALTER TABLE pre_portal_category_permission ENGINE=innodb;
  258. ALTER TABLE pre_portal_comment ENGINE=innodb;
  259. ALTER TABLE pre_portal_comment_moderate ENGINE=innodb;
  260. ALTER TABLE pre_portal_rsscache ENGINE=innodb;
  261. ALTER TABLE pre_portal_topic ENGINE=innodb;
  262. ALTER TABLE pre_portal_topic_pic ENGINE=innodb;
  263. ALTER TABLE pre_security_evilpost ENGINE=innodb;
  264. ALTER TABLE pre_security_eviluser ENGINE=innodb;
  265. ALTER TABLE pre_security_failedlog ENGINE=innodb;
  266. ALTER TABLE pre_ucenter_admins ENGINE=innodb;
  267. ALTER TABLE pre_ucenter_applications ENGINE=innodb;
  268. ALTER TABLE pre_ucenter_badwords ENGINE=innodb;
  269. ALTER TABLE pre_ucenter_domains ENGINE=innodb;
  270. ALTER TABLE pre_ucenter_failedlogins ENGINE=innodb;
  271. ALTER TABLE pre_ucenter_feeds ENGINE=innodb;
  272. ALTER TABLE pre_ucenter_friends ENGINE=innodb;
  273. ALTER TABLE pre_ucenter_mailqueue ENGINE=innodb;
  274. ALTER TABLE pre_ucenter_memberfields ENGINE=innodb;
  275. ALTER TABLE pre_ucenter_members ENGINE=innodb;
  276. ALTER TABLE pre_ucenter_mergemembers ENGINE=innodb;
  277. ALTER TABLE pre_ucenter_newpm ENGINE=innodb;
  278. ALTER TABLE pre_ucenter_notelist ENGINE=innodb;
  279. ALTER TABLE pre_ucenter_pm_indexes ENGINE=innodb;
  280. ALTER TABLE pre_ucenter_pm_lists ENGINE=innodb;
  281. ALTER TABLE pre_ucenter_pm_members ENGINE=innodb;
  282. ALTER TABLE pre_ucenter_pm_messages_0 ENGINE=innodb;
  283. ALTER TABLE pre_ucenter_pm_messages_1 ENGINE=innodb;
  284. ALTER TABLE pre_ucenter_pm_messages_2 ENGINE=innodb;
  285. ALTER TABLE pre_ucenter_pm_messages_3 ENGINE=innodb;
  286. ALTER TABLE pre_ucenter_pm_messages_4 ENGINE=innodb;
  287. ALTER TABLE pre_ucenter_pm_messages_5 ENGINE=innodb;
  288. ALTER TABLE pre_ucenter_pm_messages_6 ENGINE=innodb;
  289. ALTER TABLE pre_ucenter_pm_messages_7 ENGINE=innodb;
  290. ALTER TABLE pre_ucenter_pm_messages_8 ENGINE=innodb;
  291. ALTER TABLE pre_ucenter_pm_messages_9 ENGINE=innodb;
  292. ALTER TABLE pre_ucenter_protectedmembers ENGINE=innodb;
  293. ALTER TABLE pre_ucenter_settings ENGINE=innodb;
  294. ALTER TABLE pre_ucenter_sqlcache ENGINE=innodb;
  295. ALTER TABLE pre_ucenter_tags ENGINE=innodb;
  296. ALTER TABLE pre_ucenter_vars ENGINE=innodb;
复制代码


转换成InnoDB数据库引擎.zip

1.9 KB, 下载次数: 638

感谢大家一直以来对飞吧资源网的支持!https://www.fb93.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|飞吧地图|飞吧技术分享 ( 粤ICP备13002650号 )

GMT+8, 2024-11-21 17:56 , Processed in 0.169852 second(s), 30 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表