# Failed to connect to MySQL server: Access denied

**URL:** https://forums.percona.com/t/failed-to-connect-to-mysql-server-access-denied/4934
**Category:** Percona XtraBackup
**Created:** [June 17, 2016, 10:03am UTC](https://forums.percona.com/t/failed-to-connect-to-mysql-server-access-denied/4934 "2016-06-17T10:03:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![johnpitton](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@johnpitton](https://forums.percona.com/u/johnpitton)
#### Post date: [June 17, 2016, 10:03am UTC](https://forums.percona.com/t/failed-to-connect-to-mysql-server-access-denied/4934/1 "2016-06-17T10:03:31Z")

</div>

I went through the documented setup process for installing percona-xtrabackup. That went as expected.  
I then created a new db user for the backup process including:  
GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON _._ TO ‘bkpuser’@‘localhost’;  
FLUSH PRIVILEGES;

Whenever I run the backup process with that new user, it fails. However, if I run it as the db root user, it’s successful. Here’s the error I see when running it as the backup user account:  
160617 08:14:57 innobackupex: Starting the backup operation

IMPORTANT: Please check that the backup run completes successfully.  
At the end of a successful backup run innobackupex  
prints “completed OK!”.

160617 08:14:57 version\_check Connecting to MySQL server with DSN ‘dbi:mysql:;mysql\_read\_default\_group=xtrabackup;port=3306;mysql\_socket=/var/run/mysqld/mysqld.sock’ as ‘bkpuser’ (using password: YES).  
Failed to connect to MySQL server: DBI connect(‘;mysql\_read\_default\_group=xtrabackup;port=3306;mysql\_socket=/var/run/mysqld/mysqld.sock’,‘bkpuser’,…) failed: Access denied for user ‘bkpuser’@‘localhost’ (using password: YES) at - line 1314.  
160617 08:14:57 Connecting to MySQL server host: localhost, user: bkpuser, password: set, port: 3306, socket: /var/run/mysqld/mysqld.sock  
Failed to connect to MySQL server: Access denied for user ‘bkpuser’@‘localhost’ (using password: YES).

I can login without error to mysql using db user credentials for bkpuser, so I don’t think it’s the credentials.

I checked the logs but all I see are basic error entries: Jun 17 08:14:57 web06 mysqld: 2016-06-17 8:14:57 140128666168064 [Warning] Access denied for user ‘bkpuser’@‘localhost’ (using password: YES)  
Jun 17 08:14:57 web06 mysqld: 2016-06-17 8:14:57 140128666471168 [Warning] Access denied for user ‘bkpuser​’@‘localhost’ (using password: YES)

Any ideas what would be causing the access error, and more importantly how to resolve it?

Thanks
