Bug #86
  
    
    
  
Error While Backing Up MySQL Using rsnapshot and mysqldump
 
        
        Added by Daniel Curtis over 12 years ago.
        Updated over 11 years ago.
        
  
  
  
  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
   
 
 
  
  
    
    
    
    
       - Status changed from New to Closed
- Assignee set to Daniel Curtis
- % Done changed from 0 to 100
 
   
  
  
    
    
    
    
       - Private changed from Yes to No
 
   
  
  
    
    
    
    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