手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

MySQL从 5.1.26-rc 升级 到 5.5.15

[日期:2012-08-20] 来源:Linux社区  作者:521cto [字体:大 中 小]

e、MySQL权限库直接用的原来的权限库,有如下错误提示:
120717 11:25:00 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
120717 11:25:00 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure

解决方法:根据提示只需要运行bin/mysql_upgrade,类似如下命令(特别注意:本地在启动多个数据库的情况下,需要通过--sock制定要访问的数据库)

[root@245 mysql]# bin/mysql_upgrade --sock=/tmp/mysql_log.sock -p
Enter password:
Looking for 'mysql' as: ./mysql
Looking for 'mysqlcheck' as: ./mysqlcheck
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysql_log.sock'
Running 'mysqlcheck' with connection arguments: '--socket=/tmp/mysql_log.sock'
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log                                  OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log                                     OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
Running 'mysql_fix_privilege_tables'...
OK

对于MySQL升级有很多种方法,我个人选择了导入导出的方法,如果有读者对其他的方式感兴趣,可以做相关尝试。
以上是升级过程中的相关问题,做了简单总结,适合初学者。

linux
相关资讯       MySQL升级 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款