普通备份模式
[root@Slave02 tmp]# innobackupex --database="inno test" --user=root --password=root --no-lock --defaults-file=/etc/my.cnf /data0/backup/mysql 2>/tmp/mysqlbackup.log
xtrabackup_55 version 1.6.2 for MySQL server 5.5.10 Linux (i686) (revision id: undefined)
[01] Copying ./ibdata1
to /data0/backup/mysql/2013-03-28_10-10-45/ibdata1
[01] ...done
[01] Copying ./inno/mm.ibd
to /data0/backup/mysql/2013-03-28_10-10-45/inno/mm.ibd
[01] ...done
[01] Copying ./inno/t.ibd
to /data0/backup/mysql/2013-03-28_10-10-45/inno/t.ibd
[01] ...done
xtrabackup: The latest check point (for incremental): '893330831'
xtrabackup: Stopping log copying thread.
xtrabackup: Transaction log of lsn (893330831) to (893330831) was copied.
[root@Slave02 tmp]#
注:使用mysql的root用户将数据库testinnodb和test的备份,备份路径是/data0/backup/mysql/。备份 成功后会在该目录下将创建以时间戳为名称的备份目录。no-lock参数用于指定备份时不锁定表。2>/tmp/mysqlbackup.log是 将备份过程中的输出信息保存到/tmp/mysqlbackup.log中
[root@Slave02 tmp]# cd /data0/backup/mysql/ ---校验备份的文件
[root@Slave02 mysql]# ll
total 20
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root 83 Mar 28 10:10 stderr
-rw-r--r-- 1 root root 0 Mar 28 10:10 stdout
[root@Slave02 mysql]# cd 2013-03-28_10-10-45/
[root@Slave02 2013-03-28_10-10-45]# ll
total 469520
-rw-r--r-- 1 root root 363 Mar 28 10:10 backup-my.cnf
-rw-r--r-- 1 root root 480247808 Mar 28 10:11 ibdata1
drwx------ 2 root root 4096 Mar 28 10:11 inno
-rw-r--r-- 1 root root 0 Mar 28 10:11 mysql-stderr
-rw-r--r-- 1 root root 76 Mar 28 10:11 mysql-stdout
drwxr-xr-x 2 root root 4096 Mar 28 10:11 test
-rw-r--r-- 1 root root 13 Mar 28 10:11 xtrabackup_binary
-rw-r--r-- 1 root root 81 Mar 28 10:11 xtrabackup_checkpoints
-rw-r--r-- 1 root root 2560 Mar 28 10:11 xtrabackup_logfile
[root@Slave02 2013-03-28_10-10-45]# cd inno/
[root@Slave02 inno]# ll
total 2096
-rw-r----- 1 mysql mysql 8554 Mar 27 14:49 mm.frm
-rw-r--r-- 1 root root 1048576 Mar 28 10:11 mm.ibd
-rw-r----- 1 mysql mysql 8554 Mar 27 14:49 t.frm
-rw-r--r-- 1 root root 1048576 Mar 28 10:11 t.ibd
[root@Slave02 inno]#
[root@Slave02 tmp]# cat mysqlbackup.log ----查看备份记录的详细过程
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2011. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
130328 10:10:39 innobackupex: Starting mysql with options: --defaults-file='/etc/my.cnf' --password='root' --user='root' --unbuffered --
130328 10:10:39 innobackupex: Connected to database with mysql child process (pid=3714)
130328 10:10:45 innobackupex: Connection to database server closed
IMPORTANT: Please check that the backup run completes successfully.
At the end of a successful backup run innobackupex
prints "completed OK!".
innobackupex: Using mysql Ver 14.14 Distrib 5.5.13, for Linux (i686) using readline 5.1
innobackupex: Using mysql server version Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
innobackupex: Created backup directory /data0/backup/mysql/2013-03-28_10-10-45
130328 10:10:45 innobackupex: Starting mysql with options: --defaults-file='/etc/my.cnf' --password='root' --user='root' --unbuffered --
130328 10:10:45 innobackupex: Connected to database with mysql child process (pid=3742)
130328 10:10:49 innobackupex: Connection to database server closed
130328 10:10:49 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="/etc/my.cnf" --backup --suspend-at-end --target-dir=/data0/backup/mysql/2013-03-28_10-10-45
innobackupex: Waiting for ibbackup (pid=3754) to suspend
innobackupex: Suspend file '/data0/backup/mysql/2013-03-28_10-10-45/xtrabackup_suspended'
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /usr/local/mysql/data
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
130328 10:10:49 InnoDB: Using Linux native AIO
130328 10:10:50 InnoDB: Warning: allocated tablespace 2, old maximum was 0
>> log scanned up to (893330831)
>> log scanned up to (893330831)
>> log scanned up to (893330831)
130328 10:11:03 innobackupex: Continuing after ibbackup has suspended
130328 10:11:03 innobackupex: Starting mysql with options: --defaults-file='/etc/my.cnf' --password='root' --user='root' --unbuffered --
130328 10:11:04 innobackupex: Connected to database with mysql child process (pid=3770)
>> log scanned up to (893330831)
130328 10:11:08 innobackupex: Starting to backup .frm, .MRG, .MYD, .MYI,
innobackupex: .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files in
innobackupex: subdirectories of '/usr/local/mysql/data'
innobackupex: Backing up file '/usr/local/mysql/data/inno/mm.frm'
innobackupex: Backing up file '/usr/local/mysql/data/inno/t.frm'
innobackupex: Backing up files '/usr/local/mysql/data/test/*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}' (19 files)
130328 10:11:08 innobackupex: Finished backing up .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt files
innobackupex: Resuming ibbackup
>> log scanned up to (893330831)
130328 10:11:09 innobackupex: Connection to database server closed
innobackupex: Backup created in directory '/data0/backup/mysql/2013-03-28_10-10-45'
130328 10:11:09 innobackupex: completed OK!
[root@Slave02 tmp]#
压缩备份;
[root@Slave02 inno]# innobackupex --database="inno test" --user=root --password
=root --no-lock --defaults-file=/etc/my.cnf --stream=tar /data0/backup/mysql
2>/tmp/mysqlbackup.log|zip>/data0/backup/mysql/mike.tar.gz
adding: - (deflated 63%)
You have new mail in /var/spool/mail/root
[root@Slave02 inno]#
[root@Slave02 mysql]# ls
2013-03-28_10-10-45 mike.tar.gz stderr stdout xtrabackup_binary
[root@Slave02 mysql]# ll
total 176004
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root 180012554 Mar 28 11:03 mike.tar.gz
-rw-r--r-- 1 root root 83 Mar 28 10:10 stderr
-rw-r--r-- 1 root root 0 Mar 28 10:10 stdout
-rw-r--r-- 1 root root 13 Mar 28 11:03 xtrabackup_binary
[root@Slave02 mysql]# ll -la
total 176020
drwxr-xr-x 3 root root 4096 Mar 28 11:03 .
drwxr-xr-x 3 root root 4096 Mar 28 09:48 ..
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root 180012554 Mar 28 11:03 mike.tar.gz
-rw-r--r-- 1 root root 83 Mar 28 10:10 stderr
-rw-r--r-- 1 root root 0 Mar 28 10:10 stdout
-rw-r--r-- 1 root root 13 Mar 28 11:03 xtrabackup_binary
[root@Slave02 mysql]#
恢复过程;
[root@Slave02 mysql]# ll
total 176004
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root 180012554 Mar 28 11:03 mike.tar.gz
-rw-r--r-- 1 root root 83 Mar 28 10:10 stderr
-rw-r--r-- 1 root root 0 Mar 28 10:10 stdout
-rw-r--r-- 1 root root 13 Mar 28 11:03 xtrabackup_binary
[root@Slave02 mysql]# rm -rf /usr/local/mysql/data/inno/
[root@Slave02 mysql]# rm -rf /usr/local/mysql/data/test/
[root@Slave02 mysql]# ls -la /usr/local/mysql/data/
total 481180
drwxr-xr-x 6 mysql mysql 4096 Mar 28 11:24 .
drwxr-xr-x 13 mysql mysql 4096 Dec 10 11:40 ..
drwx------ 2 mysql mysql 4096 Jan 24 17:04 book
-rw-rw---- 1 mysql mysql 480247808 Mar 27 14:50 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Mar 28 09:35 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 24 17:04 ib_logfile1
-rw-r--r-- 1 mysql mysql 91820 Nov 27 10:33 log.1
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 mysql
-rw-rw---- 1 mysql mysql 1879 Mar 27 14:02 mysql-bin.000001
-rw-rw---- 1 mysql mysql 126 Mar 27 14:04 mysql-bin.000002
-rw-rw---- 1 mysql mysql 126 Mar 27 14:07 mysql-bin.000003
-rw-rw---- 1 mysql mysql 1766 Mar 27 14:21 mysql-bin.000004
-rw-rw---- 1 mysql mysql 493 Mar 27 14:49 mysql-bin.000005
-rw-rw---- 1 mysql mysql 107 Mar 27 14:49 mysql-bin.000006
-rw-rw---- 1 mysql mysql 107 Mar 28 09:35 mysql-bin.000007
-rw-rw---- 1 mysql mysql 133 Mar 28 09:35 mysql-bin.index
-rw-r--r-- 1 mysql mysql 33243 Nov 27 10:24 mysqld_multi.log
-rw-r--r-- 1 mysql mysql 5 Nov 27 10:28 mysql.pid
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 performance_schema
drwx------ 2 mysql mysql 4096 Jan 23 14:07 prod
-rw-rw---- 1 mysql mysql 145643 Mar 28 09:35 Slave02.err
-rw-rw---- 1 mysql mysql 5 Mar 28 09:35 Slave02.pid
-rw-r--r-- 1 mysql mysql 1041603 Jan 25 09:25 slow.log
[root@Slave02 mysql]# ls
2013-03-28_10-10-45 mike.tar.gz stderr stdout xtrabackup_binary
[root@Slave02 mysql]# tar xvzfi mike.tar.gz
backup-my.cnf
ibdata1
inno/mm.ibd
inno/t.ibd
inno/mm.frm
inno/t.frm
test/t.MYI
test/mm.MYD
test/a.MYD
test/mm.MYI
test/t1.frm
test/t_coverindex.frm
test/mm.frm
test/big_string.frm
test/a.frm
test/big_string.MYD
test/a.MYI
test/t1.MYD
test/t1.MYI
test/t.frm
test/t2.MYD
test/t.MYD
test/t2.MYI
test/t2.frm
test/big_string.MYI
xtrabackup_logfile
xtrabackup_checkpoints
[root@Slave02 mysql]#
[root@Slave02 mysql]# innobackupex --apply-log --user=root --password=root --de
faults-file=/etc/my.cnf --no-lock /data0/backup/mysql/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona Inc 2009-2011. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
IMPORTANT: Please check that the apply-log run completes successfully.
At the end of a successful apply-log run innobackupex
prints "completed OK!".
130328 11:33:57 innobackupex: Starting ibbackup with command: xtrabackup_55 --defaults-file="/etc/my.cnf" --prepare --target-dir=/data0/backup/mysql
xtrabackup_55 version 1.6.2 for MySQL server 5.5.10 Linux (i686) (revision id: undefined)
xtrabackup: cd to /data0/backup/mysql
xtrabackup: This target seems to be not prepared yet.
xtrabackup: xtrabackup_logfile detected: size=2097152, start_lsn=(893330831)
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 1
xtrabackup: innodb_log_file_size = 2097152
130328 11:33:57 InnoDB: Using Linux native AIO
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
130328 11:33:57 InnoDB: The InnoDB memory heap is disabled
130328 11:33:57 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
130328 11:33:57 InnoDB: Compressed tables use zlib 1.2.3
130328 11:33:57 InnoDB: Using Linux native AIO
130328 11:33:57 InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead
130328 11:33:57 InnoDB: Initializing buffer pool, size = 100.0M
130328 11:33:57 InnoDB: Completed initialization of buffer pool
130328 11:33:57 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130328 11:33:57 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Last MySQL binlog file position 0 474, file name ./mysql-bin.000005
130328 11:33:57 InnoDB: Waiting for the background threads to start
130328 11:33:58 InnoDB: 1.1.5 started; log sequence number 893330831
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 474, file name ./mysql-bin.000005
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
130328 11:33:58 InnoDB: Starting shutdown...
130328 11:33:59 InnoDB: Shutdown completed; log sequence number 893331069
130328 11:33:59 innobackupex: Restarting xtrabackup with command: xtrabackup_55 --defaults-file="/etc/my.cnf" --prepare --target-dir=/data0/backup/mysql
for creating ib_logfile*
xtrabackup_55 version 1.6.2 for MySQL server 5.5.10 Linux (i686) (revision id: undefined)
xtrabackup: cd to /data0/backup/mysql
xtrabackup: This target seems to be already prepared.
xtrabackup: notice: xtrabackup_logfile was already used to '--prepare'.
xtrabackup: Temporary instance for recovery is set as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
xtrabackup: innodb_log_file_size = 5242880
130328 11:33:59 InnoDB: Using Linux native AIO
xtrabackup: Starting InnoDB instance for recovery.
xtrabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
130328 11:33:59 InnoDB: The InnoDB memory heap is disabled
130328 11:33:59 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
130328 11:33:59 InnoDB: Compressed tables use zlib 1.2.3
130328 11:33:59 InnoDB: Using Linux native AIO
130328 11:33:59 InnoDB: Warning: innodb_file_io_threads is deprecated. Please use innodb_read_io_threads and innodb_write_io_threads instead
130328 11:33:59 InnoDB: Initializing buffer pool, size = 100.0M
130328 11:33:59 InnoDB: Completed initialization of buffer pool
130328 11:33:59 InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
130328 11:33:59 InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
130328 11:33:59 InnoDB: highest supported file format is Barracuda.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
130328 11:33:59 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Last MySQL binlog file position 0 474, file name ./mysql-bin.000005
130328 11:33:59 InnoDB: Waiting for the background threads to start
130328 11:34:00 InnoDB: 1.1.5 started; log sequence number 893331468
[notice (again)]
If you use binary log and don't use any hack of group commit,
the binary log position seems to be:
InnoDB: Last MySQL binlog file position 0 474, file name ./mysql-bin.000005
xtrabackup: starting shutdown with innodb_fast_shutdown = 1
130328 11:34:00 InnoDB: Starting shutdown...
130328 11:34:01 InnoDB: Shutdown completed; log sequence number 893331468
130328 11:34:01 innobackupex: completed OK!
[root@Slave02 mysql]#
[root@Slave02 mysql]# cp -r inno/ /usr/local/mysql/data/
[root@Slave02 mysql]# cp -r test/ /usr/local/mysql/data/
[root@Slave02 mysql]# ls
2013-03-28_10-10-45 inno xtrabackup_binlog_pos_innodb
backup-my.cnf mike.tar.gz xtrabackup_checkpoints
ibdata1 stderr xtrabackup_logfile
ib_logfile0 stdout
ib_logfile1 test
[root@Slave02 mysql]# ll
total 657824
drwxr-xr-x 4 root root 4096 Mar 28 10:11 2013-03-28_10-10-45
-rw-r--r-- 1 root root 303 Mar 28 11:02 backup-my.cnf
-rw-rw---- 1 mysql mysql 480247808 Mar 28 11:45 ibdata1
-rw-r--r-- 1 root root 5242880 Mar 28 11:45 ib_logfile0
-rw-r--r-- 1 root root 5242880 Mar 28 11:45 ib_logfile1
drwxr-xr-x 2 root root 4096 Mar 28 11:44 inno
-rw-r--r-- 1 root root 180012554 Mar 28 11:03 mike.tar.gz
-rw-r--r-- 1 root root 93 Mar 28 13:30 stderr
-rw-r--r-- 1 root root 0 Mar 28 13:30 stdout
drwxr-xr-x 2 root root 4096 Mar 28 11:44 test
-rw-r--r-- 1 root root 23 Mar 28 11:45 xtrabackup_binlog_pos_innodb
-rw-r--r-- 1 root root 81 Mar 28 11:45 xtrabackup_checkpoints
-rw-r--r-- 1 root root 2097152 Mar 28 11:45 xtrabackup_logfile
[root@Slave02 mysql]# ls -la /usr/local/mysql/data/
total 481188
drwxr-xr-x 8 mysql mysql 4096 Mar 28 13:52 .
drwxr-xr-x 13 mysql mysql 4096 Dec 10 11:40 ..
drwx------ 2 mysql mysql 4096 Jan 24 17:04 book
-rw-rw---- 1 mysql mysql 480247808 Mar 28 13:00 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Mar 28 13:00 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 24 17:04 ib_logfile1
drwxr-xr-x 2 root root 4096 Mar 28 13:51 inno
-rw-r--r-- 1 mysql mysql 91820 Nov 27 10:33 log.1
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 mysql
-rw-rw---- 1 mysql mysql 1879 Mar 27 14:02 mysql-bin.000001
-rw-rw---- 1 mysql mysql 126 Mar 27 14:04 mysql-bin.000002
-rw-rw---- 1 mysql mysql 126 Mar 27 14:07 mysql-bin.000003
-rw-rw---- 1 mysql mysql 1766 Mar 27 14:21 mysql-bin.000004
-rw-rw---- 1 mysql mysql 493 Mar 27 14:49 mysql-bin.000005
-rw-rw---- 1 mysql mysql 107 Mar 27 14:49 mysql-bin.000006
-rw-rw---- 1 mysql mysql 126 Mar 28 13:00 mysql-bin.000007
-rw-rw---- 1 mysql mysql 133 Mar 28 09:35 mysql-bin.index
-rw-r--r-- 1 mysql mysql 33243 Nov 27 10:24 mysqld_multi.log
-rw-r--r-- 1 mysql mysql 5 Nov 27 10:28 mysql.pid
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 performance_schema
drwx------ 2 mysql mysql 4096 Jan 23 14:07 prod
-rw-rw---- 1 mysql mysql 146109 Mar 28 13:00 Slave02.err
-rw-r--r-- 1 mysql mysql 1041603 Jan 25 09:25 slow.log
drwxr-xr-x 2 root root 4096 Mar 28 13:52 test
[root@Slave02 mysql]#
[root@Slave02 mysql]#
[root@Slave02 mysql]# chown -R mysql:mysql /usr/local/mysql/data
[root@Slave02 mysql]# ls -la /usr/local/mysql/data/
total 481188
drwxr-xr-x 8 mysql mysql 4096 Mar 28 13:52 .
drwxr-xr-x 13 mysql mysql 4096 Dec 10 11:40 ..
drwx------ 2 mysql mysql 4096 Jan 24 17:04 book
-rw-rw---- 1 mysql mysql 480247808 Mar 28 13:00 ibdata1
-rw-rw---- 1 mysql mysql 5242880 Mar 28 13:00 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 24 17:04 ib_logfile1
drwxr-xr-x 2 mysql mysql 4096 Mar 28 13:51 inno
-rw-r--r-- 1 mysql mysql 91820 Nov 27 10:33 log.1
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 mysql
-rw-rw---- 1 mysql mysql 1879 Mar 27 14:02 mysql-bin.000001
-rw-rw---- 1 mysql mysql 126 Mar 27 14:04 mysql-bin.000002
-rw-rw---- 1 mysql mysql 126 Mar 27 14:07 mysql-bin.000003
-rw-rw---- 1 mysql mysql 1766 Mar 27 14:21 mysql-bin.000004
-rw-rw---- 1 mysql mysql 493 Mar 27 14:49 mysql-bin.000005
-rw-rw---- 1 mysql mysql 107 Mar 27 14:49 mysql-bin.000006
-rw-rw---- 1 mysql mysql 126 Mar 28 13:00 mysql-bin.000007
-rw-rw---- 1 mysql mysql 133 Mar 28 09:35 mysql-bin.index
-rw-r--r-- 1 mysql mysql 33243 Nov 27 10:24 mysqld_multi.log
-rw-r--r-- 1 mysql mysql 5 Nov 27 10:28 mysql.pid
drwxr-xr-x 2 mysql mysql 4096 Dec 10 11:29 performance_schema
drwx------ 2 mysql mysql 4096 Jan 23 14:07 prod
-rw-rw---- 1 mysql mysql 146109 Mar 28 13:00 Slave02.err
-rw-r--r-- 1 mysql mysql 1041603 Jan 25 09:25 slow.log
drwxr-xr-x 2 mysql mysql 4096 Mar 28 13:52 test
[root@Slave02 mysql]# service mysqld restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.. [ OK ]
[root@Slave02 mysql]# service mysqld restart
Shutting down MySQL. [ OK ]
Starting MySQL.. [ OK ]
[root@Slave02 mysql]# mysql -uroot -proot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.13-log Source distribution
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use inno
Database changed
mysql> show tables;
+----------------+
| Tables_in_inno |
+----------------+
| mm |
| t |
+----------------+
2 rows in set (0.00 sec)
mysql> select * from mm;
+------+
| a |
+------+
| 1 |
| 2 |
| 3 |
| 4 |
| 9999 |
+------+
5 rows in set (0.02 sec)
mysql>