Chinaunix首页 | 论坛 | 博客
  • 博客访问: 629399
  • 博文数量: 110
  • 博客积分: 2352
  • 博客等级: 大尉
  • 技术积分: 1253
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-29 14:00
文章分类
文章存档

2018年(1)

2013年(20)

2012年(89)

分类: Mysql/postgreSQL

2013-07-27 16:58:57

场景:从mysql 5.1.59版本迁移数据到5.5.24,在启动时出现数据库启动失败的问题!ERROR日志信息如下:
(1)在远数据库停止服务
(2)用scp吧mydata,innodb_ts, inodb_log文件夹下的所有文件拷贝到目标服务器;
(2) 在目标数据口中配置my.cnf, 启动目标数据库

130726 01:39:20 mysqld_safe mysqld from pid file /data2/mysqldata5/sock/mysql.pid ended
130726 05:35:53 mysqld_safe Starting mysqld daemon with databases from /data2/mysqldata5/mydata
130726  5:35:53 [ERROR] An old style --language value with language specific part detected: /usr/coolpad/mysql/share/english/
130726  5:35:53 [ERROR] Use --lc-messages-dir without language specific part instead.
130726  5:35:53 [Note] Flashcache bypass: disabled
130726  5:35:53 [Note] Flashcache setup error is : open flash device failed

130726  5:35:53 [Warning] /usr/coolpad/mysql/bin//mysqld: ignoring option '--innodb-file-format-check' due to invalid value 'ON'
130726  5:35:53 InnoDB: The InnoDB memory heap is disabled
130726  5:35:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130726  5:35:53 InnoDB: Compressed tables use zlib 1.2.3
130726  5:35:53 InnoDB: Initializing buffer pool, size = 10.0G
InnoDB: HugeTLB: Warning: Failed to allocate 11031019520 bytes. errno 1
InnoDB HugeTLB: Warning: Using conventional memory pool
130726  5:35:54 InnoDB: Completed initialization of buffer pool
130726  5:35:54 InnoDB: highest supported file format is Barracuda.
InnoDB: 111 rollback segment(s) active.
130726  5:35:56  InnoDB: Waiting for the background threads to start
130726  5:35:57 Percona XtraDB () 1.1.8-20.1 started; log sequence number 980426586196
130726  5:35:57 [Note] Server hostname (bind-address): '(null)'; port: 3808
130726  5:35:57 [Note]   - '(null)' resolves to '0.0.0.0';
130726  5:35:57 [Note]   - '(null)' resolves to '::';
130726  5:35:57 [Note] Server socket created on IP: '0.0.0.0'.
130726  5:35:57 [ERROR] Missing system table mysql.proxies_priv; please run mysql_upgrade to create it
130726  5:35:57 [ERROR] Failed to open the relay log '/data/mysqldata2/relaylog/mysql-relay-bin.001085' (relay_log_pos 251)
130726  5:35:57 [ERROR] Could not find target log during relay log initialization
130726  5:35:57 [ERROR] Failed to initialize the master info structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_current' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
130726  5:35:57 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure 130726  5:35:57 [Note] Event Scheduler: Loaded 0 events
130726  5:35:57 [Note] /usr/coolpad/mysql/bin//mysqld: ready for connections.
Version: '5.5.24-log'  socket: '/data2/mysqldata5/sock/mysql.sock'  port: 3808  Source distribution
130726  5:35:57 [Note] Event Scheduler: scheduler thread started with id 1
130726  5:37:47 [Note] /usr/coolpad/mysql/bin//mysqld: Normal shutdown

130726  5:37:47 [Note] Event Scheduler: Killing the scheduler thread, thread id 1
130726  5:37:47 [Note] Event Scheduler: Waiting for the scheduler thread to reply
130726  5:37:47 [Note] Event Scheduler: Stopped
130726  5:37:47 [Note] Event Scheduler: Purging the queue. 0 events
130726  5:37:47  InnoDB: Starting shutdown...

解决方法:
 mysql_upgrade -d /data1/mysqldata2/mydata -f -S /data1/mysqldata2/sock/mysql.sock -uroot -pXXXX
注:执行时必须在数据库启动的条件下才能执行,不然是无效的!

source /usr/share/mysql/mysql_fix_privilege_tables.sql


原因:目前还不清楚,如果有哪位高手知道,指点一下!
阅读(3706) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~