器量大者,福泽必厚
全部博文(587)
分类: Mysql/postgreSQL
2009-10-07 10:26:19
datadir=…
innodb_data_home_dir=…
innodb_data_file_path=…
innodb_log_group_home_dir=…
innodb_log_files_in_group=…
innodb_log_file_size=…
我的my.cnf如下:
[mysqld]
datadir=/usr/local/mysql/data
socket=/tmp/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
#datadir = /usr/local/mysql/data
innodb_data_home_dir = /usr/local/mysql/data
innodb_data_file_path = ibdata1:30M:autoextend
innodb_log_group_home_dir = /usr/local/mysql/data
log-bin=mysql-bin
lower_case_table_names=1
set-variable = innodb_log_files_in_group=2
set-variable = innodb_log_file_size=5M
[mysql.server]
user=mysql
basedir=/usr/local/mysql
[mysqld_safe]
log-error=/usr/local/mysql/data/mysqld.log
pid-file=/usr/local/mysql/data/mysqld.pid
##我的机器上mysql安装在/usr/local/mysql这个目录
我备份到/home/mysql/backup目录下,当然我机器上有myqsl用户, 在/home/mysql下创建backup目录
su - mysql
mkdir backup
我的ibbackup.cnf文件如下:
[root@localhost etc]# cat /etc/ibbackup.cnf
datadir = /home/mysql/backup
innodb_data_home_dir = /home/mysql/backup
innodb_data_file_path = ibdata1:30M:autoextend
innodb_log_group_home_dir = /home/mysql/backup
set-variable = innodb_log_files_in_group=2
set-variable = innodb_log_file_size=20M
到此配置基本完成!
4:我下载下来的文件如下图:
innodb_data_file_path = ibdata1:30M:autoextend的大小也应该相同(我一个设置为10M,另一个30M也出现了问题)以下是正常运行:
5:到mysql用户的backup目录下查看: