Article ID: 6183, created on Mar 23, 2009, last review on May 10, 2014

  • Applies to:
  • Plesk Billing


The following error is shown when access page "Administrative Login" of Parallels Plesk at https://<billing hostname>:8443/plesk-billing/admin/login.php

TRANS_DATABASEERROR Failed to connect to database. Check database configuration.

And the error below is shown in error log if sw-cp-server.

2009-03-23 03:56:34: (mod_fastcgi.c.2589) FastCGI-stderr: PHP Warning:  mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Acc
ess denied for user 'billing'@'localhost' (using password: YES) in /opt/plesk-billing/lib-db/core/drivers/ on line 372


Parallels Plesk Billing application is unable to to access its database due to incorrect configuration:

# grep db /opt/plesk-billing/lib-billing/include/config/config.php
$CONF["dbType"] = "mysql";
$CONF["dbHost"] = "localhost";
$CONF["dbName"] = "billing";
$CONF["dbUser"] = "billing";
$CONF["dbPassword"] = "ba12b9aded82c5ab1015f54d825cb04146ea078d";

To confirm this cause use the above parameters during the authentication attempt as below:
# mysql -hlocalhost -ubilling -pba12b9aded82c5ab1015f54d825cb04146ea078d billing
ERROR 1045 (28000): Access denied for user 'billing'@'localhost' (using password: YES)


1. Make sure the dbType and dbHost configuration parameters are set to mysql and localhost respectively.

2. Make sure the database, configured by dbName parameter exists and is the actual Parallels Plesk Billing database:
# echo "show tables"|mysql -uadmin -p`cat /etc/psa/.psa.shadow` billing|head

3. Make sure the user configured by dbUser parameter can authenticate using dbPassword parameter and has appropriate privileges on the database configured by dbName parameter:
# echo 'SHOW GRANTS FOR CURRENT_USER();' |mysql -hlocalhost -ubilling -pba12b9aded82c5ab1015f54d825cb04146ea078d billing
Grants for billing@localhost
GRANT USAGE ON *.* TO 'billing'@'localhost' IDENTIFIED BY PASSWORD '44cffe1c51455bbd'
GRANT ALL PRIVILEGES ON `billing`.* TO 'billing'@'localhost'

4. Depending on the results of the above evaluation:
a. Reset password for the database user:
# echo 'SET PASSWORD FOR "billing"@"localhost" = PASSWORD("ba12b9aded82c5ab1015f54d825cb04146ea078d")'|mysql -uadmin -p`cat /etc/psa/.psa.shadow`

b. Grant necessary privileges to the database user:
# echo 'GRANT ALL PRIVILEGES ON `billing`.* TO "billing"@"localhost";' | mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Above examples assume the Parallels Plesk Billing configuration as shown in the Cause part. The command mysql -uadmin -p`cat /etc/psa/.psa.shadow` is used to authenticate as the MySQL administrative user and could be used for a Parallels Plesk Billing installation bundled with Parallels Plesk Panel. For standalone installation appropriate username and password has to be provided.

08b3edb77202fffdd656b40acff117c1 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF