重庆思庄Oracle、Redhat认证学习论坛

标题: mysql enterprise backup 备份可能出错的地方 [打印本页]

作者: 郑全    时间: 2015-4-24 09:47
标题: mysql enterprise backup 备份可能出错的地方

[root@sztech1 ~]# mysqlbackup -uroot -proot --socket=/usr/local/mysql/mysql.sock  --backup_dir=/u01/back_data backup-and-apply-log
MySQL Enterprise Backup version 3.11.0 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2014/08/26]
Copyright (c) 2003, 2014, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 mysqlbackup -uroot -pxxxx --socket=/usr/local/mysql/mysql.sock
        --backup_dir=/u01/back_data backup-and-apply-log

 mysqlbackup: INFO:
 mysqlbackup: INFO: MySQL server version is '5.6.23-log'.
 mysqlbackup: INFO: Got some server configuration information from running server.

 mysqlbackup: ERROR: Backup directory already exists and is not empty.
  Please remove backup directory and retry.

mysqlbackup failed with errors!

 

 

--backup_dir 必须是空目录。


作者: 郑全    时间: 2015-4-24 09:49

对于源码安装,使用这个mysqlbackup ,默认socket在/tmp/mysql.sock ,因此需要指定 --socket,否则,要报错:

[root@sztech1 ~]# mysqlbackup -uroot -proot   --backup_dir=/u01/dbback/ backup-and-apply-log
MySQL Enterprise Backup version 3.11.0 Linux-3.8.13-16.2.1.el6uek.x86_64-x86_64 [2014/08/26]
Copyright (c) 2003, 2014, Oracle and/or its affiliates. All Rights Reserved.

 mysqlbackup: INFO: Starting with following command line ...
 mysqlbackup -uroot -pxxxx --backup_dir=/u01/dbback/ backup-and-apply-log

 mysqlbackup: INFO:
150424 08:25:22 mysqlbackup: WARNING: Can not establish connection to mysql server.
      Connection open fails with error "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
 mysqlbackup: ERROR: Connection initialization error.

mysqlbackup failed with errors!






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2