Backup creation fails with the following error:
Error: mysql "db_name" Cannot connect to mysql localhost:3306 (database 'db_name')
The following error appears in
DBI connect('dbname=db_name;host=localhost;port=3306','admin',...) failed: Unknown database 'db_name' at /usr/local/psa/PMM/agents/shared/Db/DbiBackend.pm line 47 ERROR 1049 (42000): Unknown database 'db_name'
The backup creation fails because
db_name database does not exist in MySQL server, most likely it was removed not via Plesk interface, but via MySQL command line.
mysql> use db_name; ERROR 1049 (42000): Unknown database 'db_name'
In order to remove it properly from Plesk follow the steps:
Create an empty database with
db_namename via MySQL command line:
mysql> create database <database_name>; Query OK, 1 row affected (0.00 sec)
Remove it properly via Plesk interface under Home - Subscriptions - example.com - Websites & Domains - Databases
Also you can remove a database using CLI utility
# /usr/local/psa/bin/database -r db_name
After that rerun backup creation task.