Project

General

Profile

Actions

Bug #86

closed
DC DC

Error While Backing Up MySQL Using rsnapshot and mysqldump

Bug #86: Error While Backing Up MySQL Using rsnapshot and mysqldump

Added by Daniel Curtis almost 13 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/02/2013
Due date:
% Done:

100%

Estimated time:
0:30 h
Spent time:

Description

While setting up the backup system for a server and testing the rsnapshot script I get an error:

mysqldump: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) when trying to connect


Related issues 1 (0 open1 closed)

Related to Website Hosting - Support #85: Backing Up with Rsnapshot & Snapshots Of MySQL DatabasesClosedDaniel Curtis03/02/2013

Actions

DC Updated by Daniel Curtis almost 13 years ago Actions #1

  • Status changed from New to Closed
  • Assignee set to Daniel Curtis
  • % Done changed from 0 to 100

There is either no user debian-sys-maint in the MySQL user table, or the password for debian-sys-maint in the MySQL user table does not match /etc/mysql/debian.cnf

Refer to https://project.altservice.com/issues/85#Create-debian-sys-maint-user

DC Updated by Daniel Curtis over 12 years ago Actions #2

  • Private changed from Yes to No

DC Updated by Daniel Curtis almost 12 years ago Actions #3

I managed to come up with a fix. First get the password of the debian-sys-maint user from the default configuration:

cat /etc/mysql/debian.cnf

#! 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

Then log into a mysql console as root:

mysql -u root -p

Then update the debian-sys-maint users password:

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '<password>';
FLUSH PRIVILEGES;

Resources

Actions

Also available in: PDF Atom