最近准备mysql的升级,老版本为5.126 属于非GA版本
老板本是源码安装的,于是最新的GA版本5.145也准备使用源码安装。
安装完成后,打开数据库,没有问题
将mysql 5.145的数据库文件全部删除,将5.126的所有数据文件拷贝,打开数据库,没有问题
于是开始升级。
mysql_upgrade –pxxxxxx
oa_sales.vtiger_vposbillingcycle
Error : Unknown table engine 'InnoDB'
error : Corrupt
oa_sales.vtiger_vposcf
Error : Unknown table engine 'InnoDB'
error : Corrupt
oa_sales.vtiger_vposgrouprelation
Error : Unknown table engine 'InnoDB'
error : Corrupt
oa_sales.vtiger_wordtemplates
Error : Unknown table engine 'InnoDB'
error : Corrupt
Running 'mysql_fix_privilege_tables'...
OK
所有inno db 的表没有通过。
于是查看数据库的引擎:
mysql> show variables like'%inno%';
+-----------------------+-------+
| Variable_name | Value |
+-----------------------+-------+
| have_innodb | NO |
| ignore_builtin_innodb | OFF |
+-----------------------+-------+
2 rows in set (0.00 sec)
mysql> show plugin;
+------------+--------+----------------+---------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+------------+--------+----------------+---------+---------+
默认情况没有编译innodb
重新编译
./configure --prefix=/usr/local/mysql --with-plugins=innobase
make
make install
重新升级
mysql_upgrade –pxxxxxx -f
userguide.wp_options OK
userguide.wp_postmeta OK
userguide.wp_posts OK
userguide.wp_term_relationships OK
userguide.wp_term_taxonomy OK
userguide.wp_terms OK
userguide.wp_usermeta OK
userguide.wp_users OK
Running 'mysql_fix_privilege_tables'...
OK
重启数据库后,打完手工。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8135069/viewspace-630092/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8135069/viewspace-630092/