Backup2l failing

I seem to be getting the following when trying to run backup2l -b on my current boockworm build

ERROR 1045 (28000): Access denied for user ‘sympl’@‘localhost’ (using password: YES)
ERROR: == errorcode 1 ==
run-parts: /etc/sympl/backup.d/pre-backup.d//20-sympl-sqldump exited with return code 1
root@windsurf1:~# backup2l -b

How much free space is there?
sudo df -h

63gb and the backup should take 43 according to backup2l

Another bright idea bites the dust!

Seems to be something to do with permissions on sql but not sure how to correct that

My first port of call would be
sudo sympl-filesystem-security
Might help!

Thanks tried that but still getting the message below which suggests it is a problem with the login to mysql. I am not sure where it is calling this from to correct.

Running pre-backup procedure…
=> Checking there is enough free space for a backup…

  • Free space on /var/backups/localhost: 61.9 GB
  • Estimated backup size: 42.9 GB

=> There is enough space to take a backup.

ERROR 1045 (28000): Access denied for user ‘sympl’@‘localhost’ (using password: YES)
ERROR: == errorcode 1 ==
run-parts: /etc/sympl/backup.d/pre-backup.d//20-sympl-sqldump exited with return code 1
root@myserver:~# Running pre-backup procedure…
=> Checking there is enough free space for a backup…

  • Free space on /var/backups/localhost: 61.9 GB
  • Estimated backup size: 42.9 GB

=> There is enough space to take a backup.

ERROR 1045 (28000): Access denied for user ‘sympl’@‘localhost’ (using password: YES)
ERROR: == errorcode 1 ==
run-parts: /etc/sympl/backup.d/pre-backup.d//20-sympl-sqldump exited with return code 1

You’ve managed to remove, change the password for or delete the Sympl users password in MySQL.

This is the user used by the Sympl CLI as well as things like backups to make SQL dumps.

You can find this in /home/sympl/.my.cnf - if you sudo mysql and log in as root, root, you can then change set the password back again to the info in the config file.

Hmm, I can still login to PHPmyadmin with the sympl username and password. I’ve just tried changing that and am still getting the same error. I have also rebooted the machine.

Running pre-backup procedure…
=> Checking there is enough free space for a backup…

  • Free space on /var/backups/localhost: 60.9 GB
  • Estimated backup size: 43.9 GB

=> There is enough space to take a backup.

ERROR 1045 (28000): Access denied for user ‘sympl’@‘localhost’ (using password: YES)
ERROR: == errorcode 1 ==
run-parts: /etc/sympl/backup.d/pre-backup.d//20-sympl-sqldump exited with return code 1

If you’ve changed the password for the Sympl user in MySQL, you’ll need to update it in /home/sympl/.my.cnf and potentially /root/.my.cnf to match.

Generally you shouldn’t need to log into phpMyAdmin as the Sympl user however, as that’s expecting you’re using the relevant database credentials.

Sorry for the long time before my reply. Here is what I did to correct the issue thanks to your help.

Here's the full sequence. Sympl runs on Debian with MariaDB, where root logs in through the system socket, so sudo mysql should get you in without a password.

1. See what password Sympl expects

sudo cat /home/sympl/.my.cnf

You'll see something like:

[client]
user=sympl
password=SomeLongPassword

Keep this open or copy the password somewhere temporary.

2. Confirm the problem

sudo -u sympl mysql -e "SELECT 1;"

If that gives the 1045 error, the database's copy of the password doesn't match the file.

3. Log in as the database root

sudo mysql

You should get a MariaDB [(none)]> prompt.

4. Check whether the sympl user still exists

sql
SELECT User, Host, plugin FROM mysql.user WHERE User='sympl';

What you do next depends on the result.

5a. If a row comes back (the user exists, but its password changed), reset the password:

sql
ALTER USER 'sympl'@'localhost' IDENTIFIED BY 'SomeLongPassword';
FLUSH PRIVILEGES;

5b. If no rows come back (the user was deleted), recreate it with full privileges:

sql
CREATE USER 'sympl'@'localhost' IDENTIFIED BY 'SomeLongPassword';
GRANT ALL PRIVILEGES ON *.* TO 'sympl'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;

Sympl needs full privileges because its CLI creates databases and users for your sites, and the backups dump every database.

In either case, replace SomeLongPassword with the exact password from .my.cnf, inside single quotes. If the password itself contains a single quote, put a backslash before it (\').

6. Check the grants and exit

sql
SHOW GRANTS FOR 'sympl'@'localhost';
EXIT;

7. Test again

sudo -u sympl mysql -e "SELECT 1;"

You should now get a small table with 1 in it instead of the error.