利用Xtrabackup备份集合恢复一台从库的过程_MySQL

php中文网
发布: 2016-06-01 13:30:03
原创
1333人浏览过

bitsCN.com

利用xtrabackup备份集合恢复一台从库的过程

 

双轨制会员管理系统 v9.1
双轨制会员管理系统 v9.1

双轨制会员管理系统是一个以asp+access进行开发的双轨制直销系统源码,要求很低,容易维护。 后台路径:/admin 后台用户名和密码均为:admin 9.1版更新内容: 1、增加了操作余额前自动备份数据库,如果操作成功,则自动删除备份的数据库;如果操作有页面错误导致不成功,则会自动恢复到备份的数据库。这样运行过程中,即使是程序错误,也不用担心数据丢失了。 2、增加会员登录首

双轨制会员管理系统 v9.1 843
查看详情 双轨制会员管理系统 v9.1

1 time tar -xvf Open..tarx.gz

 

real    35m22.502s

user    10m16.499s

sys     1m28.578s

You have new mail in /var/spool/mail/root

PS:  Open..tarx.gzv 大小80G

 

 

2 time innobackupex --user=xxx --password=xxxx --defaults-file=/etc/my.cnf  --apply-log /home/alldb/

real    1m14.259s

user    0m0.356s

sys     0m2.672s

You have new mail in /var/spool/mail/root

 

 

3 copy以及chown

PS:磁盘空间不足,所以不能执行copyback,直接MV了。

mv /home/alldb/* /data/xxxx/open/ 

chown -R mysql.mysql /data/xxxx/open/

 

 

4 启动 service mysqld start

用5.5.20的mysql启动报错如下:

121221 10:40:36 mysqld_safe Starting mysqld daemon with databases from /data/md/open

121221 10:40:36 [Note] Flashcache bypass: disabled

121221 10:40:36 [Note] Flashcache setup error is : ioctl failed

 

 

121221 10:40:36 InnoDB: The InnoDB memory heap is disabled

121221 10:40:36 InnoDB: Mutexes and rw_locks use GCC atomic builtins

121221 10:40:36 InnoDB: Compressed tables use zlib 1.2.3

121221 10:40:36 InnoDB: Initializing buffer pool, size = 4.9G

121221 10:40:37 InnoDB: Completed initialization of buffer pool

121221 10:40:37 InnoDB: Error: data file /data/md/open/ibdata2 uses page size 1024,

121221 10:40:37 InnoDB: but the only supported page size in this release is=16384

121221 10:40:37 InnoDB: Could not open or create data files.

121221 10:40:37 InnoDB: If you tried to add new data files, and it failed here,

121221 10:40:37 InnoDB: you should now edit innodb_data_file_path in my.cnf back

121221 10:40:37 InnoDB: to what it was, and remove the new ibdata files InnoDB created

121221 10:40:37 InnoDB: in this failed attempt. InnoDB only wrote those files full of

121221 10:40:37 InnoDB: zeros, but did not yet use them in any way. But be careful: do not

121221 10:40:37 InnoDB: remove old data files which contain your precious data!

121221 10:40:37 [ERROR] Plugin 'InnoDB' init function returned error.

121221 10:40:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

121221 10:40:37 [ERROR] Unknown/unsupported storage engine: InnoDB

121221 10:40:37 [ERROR] Aborting

 

 

121221 10:40:37 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

 

 

121221 10:40:37 mysqld_safe mysqld from pid file /data/md/open/test-db-20058.pid ended

 

 

5 google很久,看到说mysql升级到5.5的时候也报but the only supported page size in this release is=16384的错误,

于是就找原来版本5.1的安装目录,用mysqld_safe启动,ok,搞定

sudo /usr/local/mysql-5.1.56/bin/mysqld_safe --basedir=/usr/local/mysql-5.1.56/ --datadir=/data/md/open --user=mysql &

 

 

6 mysql 登录正常,验证slave:

 

 

mysql> grant all on *.* to 'tim'@'%' identified by 'xxxxx';

 

 

mysql> change master to master_user='repl', master_password='xxx#@!xxxx', master_host='90.60.201.30', master_log_file='mysql-bin.000449',master_log_pos=831708136;

 

 

mysql> start slave;

 

 

mysql> show slave status/G;

*************************** 1. row ***************************

               Slave_IO_State: 

                  Master_Host: 90.60.201.30

                  Master_User: repl

                  Master_Port: 3306

                Connect_Retry: 60

              Master_Log_File: mysql-bin.000449

          Read_Master_Log_Pos: 831708239

               Relay_Log_File: mb-bbs-db3-relay-bin.003261

                Relay_Log_Pos: 3914557

        Relay_Master_Log_File: mysql-bin.000449

             Slave_IO_Running: Yes

            Slave_SQL_Running: Yes

              Replicate_Do_DB: 

          Replicate_Ignore_DB: 

           Replicate_Do_Table: 

       Replicate_Ignore_Table: 

      Replicate_Wild_Do_Table: 

  Replicate_Wild_Ignore_Table: 

                   Last_Errno: 0

                   Last_Error: 

                 Skip_Counter: 0

          Exec_Master_Log_Pos: 831708239

              Relay_Log_Space: 3940542

              Until_Condition: None

               Until_Log_File: 

                Until_Log_Pos: 0

           Master_SSL_Allowed: No

           Master_SSL_CA_File: 

           Master_SSL_CA_Path: 

              Master_SSL_Cert: 

            Master_SSL_Cipher: 

               Master_SSL_Key: 

        Seconds_Behind_Master: 0

Master_SSL_Verify_Server_Cert: No

                Last_IO_Errno: 0

                Last_IO_Error: 

               Last_SQL_Errno: 0

               Last_SQL_Error: 

1 row in set (0.00 sec)

 

 

ERROR: 

No query specified

bitsCN.com
最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门推荐
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号