Mariadb 5.5.30 用 percona 5.5.30 的mysql系统库启动时会报错
- [ERROR] Incorrect definition of table mysql.event: expected column ‘sql_mode’ at position 14 to have type set ……
- [ERROR] mysqld: Table ‘./mysql/tables_priv’ is marked as crashed and should be repaired
- [Warning] Checking table: ‘./mysql/tables_priv’
- [ERROR] mysql.tables_priv: 1 client is using or hasn’t closed the table properly
- mysql.proc …..
Mariadb和percona的mysql.event此表结构有点不同
diff -u Mariadb.event.txt percona.event.txt
— event.txt 2013-05-04 10:35:25.939778373 -0400
+++ event2.txt 2013-05-04 10:36:12.221966298 -0400
@@ -12,7 +12,7 @@
`ends` datetime DEFAULT NULL,
`status` enum(‘ENABLED’,'DISABLED’,'SLAVESIDE_DISABLED’) NOT NULL DEFAULT ‘ENABLED’,
`on_completion` enum(‘DROP’,'PRESERVE’) NOT NULL DEFAULT ‘DROP’,
- - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
- NOT NULL DEFAULT '',
- + `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH')
- NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ”,
`originator` int(10) unsigned NOT NULL,
`time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT ‘SYSTEM’,
导致event无法使用, 在咨询P.linux兄后,解决办法如下
装一个纯净的mariadb,
然后从percona导出mysql库
mysqldump -B mysql –opt –triggers=true –events -u root -p > mmmmmysql.sql
注释掉mysql.event, mysql.proc 表的建表语句(留下insert),然后手工导mmmmmysql.sql 进Mariadb 5.5.30
再启动Mariadb就没报错了 ,能正常运行!
原文链接:http://www.mysqlops.com/2013/05/08/percona-5-5-30-%E8%BD%AC%E6%8A%95-mariadb-5-5-30-%E5%B0%8F%E8%AE%B0.html
本文标题:Percona5.5.30转投MariaDB5.5.30小记
地址分享:http://www.csdahua.cn/qtweb/news44/376094.html
网站建设、网络推广公司-快上网,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 快上网