在使用MariaDB 10.0replacemySQL 5.7后,mysql_upgrade在Event Scheduler上失败

我在Ubuntu 16.04服务器上用MariaDB 10.0取代了mySQL 5.7。 我在使用mysqldump安装之前备份了数据库。 在MariaDB安装期间,它表示一个“标志文件”目前意味着数据库不是二进制兼容的,所以我恢复了备份后安装。 MariaDB不喜欢我的特权表,所以我试图运行mysql_upgrade。 这是输出的日志(只有详尽度和系统表):

root@server:~# mysql_upgrade --force -s -vvv Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck The --upgrade-system-tables option was used, user tables won't be touched. Phase 1/6: Checking and upgrading mysql database Running 'mysqlcheck with default connection arguments # Connecting to localhost... # Disconnecting from localhost... Processing databases mysql CHECK TABLE `column_stats` FOR UPGRADE mysql.column_stats OK CHECK TABLE `columns_priv` FOR UPGRADE mysql.columns_priv OK CHECK TABLE `db` FOR UPGRADE mysql.db OK CHECK TABLE `engine_cost` FOR UPGRADE mysql.engine_cost OK CHECK TABLE `event` FOR UPGRADE mysql.event OK CHECK TABLE `event_old` FOR UPGRADE mysql.event_old OK CHECK TABLE `func` FOR UPGRADE mysql.func OK CHECK TABLE `gtid_executed` FOR UPGRADE mysql.gtid_executed OK CHECK TABLE `gtid_slave_pos` FOR UPGRADE mysql.gtid_slave_pos OK CHECK TABLE `help_category` FOR UPGRADE mysql.help_category OK CHECK TABLE `help_keyword` FOR UPGRADE mysql.help_keyword OK CHECK TABLE `help_relation` FOR UPGRADE mysql.help_relation OK CHECK TABLE `help_topic` FOR UPGRADE mysql.help_topic OK CHECK TABLE `host` FOR UPGRADE mysql.host OK CHECK TABLE `index_stats` FOR UPGRADE mysql.index_stats OK CHECK TABLE `innodb_index_stats` FOR UPGRADE mysql.innodb_index_stats OK CHECK TABLE `innodb_table_stats` FOR UPGRADE mysql.innodb_table_stats OK CHECK TABLE `ndb_binlog_index` FOR UPGRADE mysql.ndb_binlog_index OK CHECK TABLE `plugin` FOR UPGRADE mysql.plugin OK CHECK TABLE `proc` FOR UPGRADE mysql.proc OK CHECK TABLE `procs_priv` FOR UPGRADE mysql.procs_priv OK CHECK TABLE `proxies_priv` FOR UPGRADE mysql.proxies_priv OK CHECK TABLE `roles_mapping` FOR UPGRADE mysql.roles_mapping OK CHECK TABLE `server_cost` FOR UPGRADE mysql.server_cost OK CHECK TABLE `servers` FOR UPGRADE mysql.servers OK CHECK TABLE `slave_master_info` FOR UPGRADE mysql.slave_master_info OK CHECK TABLE `slave_relay_log_info` FOR UPGRADE mysql.slave_relay_log_info OK CHECK TABLE `slave_worker_info` FOR UPGRADE mysql.slave_worker_info OK CHECK TABLE `table_stats` FOR UPGRADE mysql.table_stats OK CHECK TABLE `tables_priv` FOR UPGRADE mysql.tables_priv OK CHECK TABLE `time_zone` FOR UPGRADE mysql.time_zone OK CHECK TABLE `time_zone_leap_second` FOR UPGRADE mysql.time_zone_leap_second OK CHECK TABLE `time_zone_name` FOR UPGRADE mysql.time_zone_name OK CHECK TABLE `time_zone_transition` FOR UPGRADE mysql.time_zone_transition OK CHECK TABLE `time_zone_transition_type` FOR UPGRADE mysql.time_zone_transition_type OK CHECK TABLE `user` FOR UPGRADE mysql.user OK Phase 2/6: Fixing views... Skipped Phase 3/6: Running 'mysql_fix_privilege_tables' ERROR 1408 (HY000) at line 539: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. FATAL ERROR: Upgrade failed 

如何解决事件调度程序问题,以便过程可以完成? 我不得不跳过授予表来达到这一点,所以我可以理解的是,我很想解决这个问题,所以我可以用适当的权限运行服务器。

我无法解决这个问题。

但是,我确实已经到了我想要的地方了:我使用--skip-grant-tables启动了服务器,备份了我想保留的每个数据库,然后删除数据文件夹并运行mysql_install_db以创build系统的新副本表。 我再次设置权限,然后重新导入数据库。 现在一切OK。