经过这段时间的运行,发现会出现楼层消失问题。经和 Comsenz 公司技术人员探讨,知晓了原因,因此建议暂时不要对 form_postposition、common_member_grouppm、forum_post 做更改 PRIMARAY KEY 的操作,也就是说建议使用如下脚本:
#!/bin/bash
#dx2_myisam2innodb.sh
USER="root"
PASS="chang.me.please"
FILE_SQL="sql.myisam2innodb"
NAME_DB="discuzX2"
cat > "${FILE_SQL}" << EOF
USE ${NAME_DB};
EOF
mysql -u"${ USER}" -p"${PASS}" -ANe " SELECT CONCAT( 'ALTER TABLE ', table_name, ' ENGINE=InnoDB;') as ToSQL from information_schema.tables where TABLE_SCHEMA= '${NAME_DB}' and ENGINE= 'MYISAM' and table_name NOT in ( 'pre_forum_postposition', 'pre_common_member_grouppm', 'pre_forum_post') order by TABLE_ROWS;" >> "${FILE_SQL}"
mysql -u"${ USER}" -p"${PASS}" < "${FILE_SQL}"
#dx2_myisam2innodb.sh
USER="root"
PASS="chang.me.please"
FILE_SQL="sql.myisam2innodb"
NAME_DB="discuzX2"
cat > "${FILE_SQL}" << EOF
USE ${NAME_DB};
EOF
mysql -u"${ USER}" -p"${PASS}" -ANe " SELECT CONCAT( 'ALTER TABLE ', table_name, ' ENGINE=InnoDB;') as ToSQL from information_schema.tables where TABLE_SCHEMA= '${NAME_DB}' and ENGINE= 'MYISAM' and table_name NOT in ( 'pre_forum_postposition', 'pre_common_member_grouppm', 'pre_forum_post') order by TABLE_ROWS;" >> "${FILE_SQL}"
mysql -u"${ USER}" -p"${PASS}" < "${FILE_SQL}"
以下链接由康盛公司技术人员提供,谢谢他们的大力支持:
转载于:https://blog.51cto.com/floss/1030055