mysql innobackupex restore note

本文解决InnoDB备份恢复中遇到的权限错误问题,包括如何设置debian-sys-maint用户的密码及修复innobackupex 1.5.1版本bug的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

innobackupex 恢复遇到问题

error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

解决:

http://stackoverflow.com/questions/11644300/access-denied-for-user-debian-sys-maint

That’s because Debian has a MySQL account debian-sys-maint used for switching on/off and checking status. The password for that user should be the same as stored in /etc/mysql/debian.cnf. The file looks like this:

# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host     = localhost
user     = debian-sys-maint
password = <password>
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = debian-sys-maint
password = <password>
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

If the password doesn't match (for example because you changed it manually) the init script won't work anymore. You should set the password according to the file. So

mysql -u root -p
# Then type MySQL root password
GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';

innobackupex: Error: Original data directory '/var/lib/mysql' is not empty!

1.5.1的一个bug

  • http://willvvv.iteye.com/blog/1561124
  • http://www.percona.com/blog/2011/12/19/percona-xtrabackup-1-6-4/

源里的xtrabackup 版本是2.2.5,而innobackupex 版本是1.5.1, 一开始的解决方法是直接删除/var/lib/mysql

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值