CentOS 6.4 系统,使用YUM升级MySQL5.1.x到MySQL5.6.x

 

1. 下载MySQL Yum 仓库

    Download MySQL Yum Repository

   

2. 安装 mysql-community-release-el6-5.noarch.rpm

rpm -ivh mysql-community-release-el6-5.noarch.rpm

3. 停止MySQL

service mysqld stop

 4. 更新MySQL

yum update mysql-server.x86_64

 5. 启动MySQL

service mysqld start

 6. 升级后的问题

 6.1 启动失败

 6.1.1 报错日志

2014-10-23 22:59:00 3338 [ERROR] InnoDB: auto-extending data file ./ibdata1 is of a different size 640 pages (rounded down to MB) than specified in the .cnf file: init
ial 768 pages, max 0 (relevant if non-zero) pages!
2014-10-23 22:59:00 3338 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed her
e, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote th
ose files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
2014-10-23 22:59:00 3338 [ERROR] Plugin 'InnoDB' init function returned error.
2014-10-23 22:59:00 3338 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2014-10-23 22:59:00 3338 [ERROR] Unknown/unsupported storage engine: InnoDB
2014-10-23 22:59:00 3338 [ERROR] Aborting

 6.1.2 解决办法, /etc/my.cnf 添加配置

[mysqld]
innodb_data_file_path=ibdata1:10M:autoextend

 6.2 授权出错: ERROR 2013 (HY000): Lost connection to MySQL server

 6.2.1 错误日志

2014-10-23 17:32:57 14289 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_host_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_user_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_account_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'host_cache' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'objects_summary_global_by_type' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'setup_actors' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'setup_objects' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_index_usage' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'table_io_waits_summary_by_table' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'table_lock_waits_summary_by_table' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_current' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_history' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_history_long' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_thread_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_user_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_host_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_stages_summary_global_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_current' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_history' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_history_long' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_thread_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_account_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_user_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_host_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_global_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'events_statements_summary_by_digest' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'users' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'accounts' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'hosts' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'socket_instances' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'socket_summary_by_instance' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'socket_summary_by_event_name' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'session_connect_attrs' has the wrong structure
2014-10-23 17:32:57 14289 [ERROR] Native table 'performance_schema'.'session_account_connect_attrs' has the wrong structure
2014-10-23 17:32:57 14289 [Note] Event Scheduler: Loaded 0 events

  6.2.2 解决办法

# mysql_upgrade

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值