Project

General

Profile

Bug #86

Error While Backing Up MySQL Using rsnapshot and mysqldump

Added by Daniel Curtis over 4 years ago. Updated over 3 years ago.

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

100%

Estimated time:
0.50 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

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

History

#1 Updated by Daniel Curtis over 4 years ago

  • 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

#2 Updated by Daniel Curtis about 4 years ago

  • Private changed from Yes to No

#3 Updated by Daniel Curtis over 3 years ago

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

Also available in: Atom PDF