IF anyone still need this, I managed to solve the problem. The problem I had was that grants for apsc where set to localhost, however in configuration for Applications host was set to "127.0.0.1" as a result apsc was unable to connect to apsc db. As a solution you need to make update either in GRANTS e.g. set to 127.0.0.1 or set localhost for connections.
steps:
check grants that are set in mysql db and make sure we are going to make correct changes:
[root@ ]#mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> use mysql;
mysql> select * from user where User='apsc';SHOW GRANTS FOR 'apsc'@'localhost';
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| localhost | apsc | *09C714AAB4B6F7B4704EAC765B6ECBEC26FBF5E9 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 |
+-----------+------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
1 row in set (0.00 sec)
+-------------------------------------------------------------------------------------------------------------+
| Grants for apsc@localhost |
+-------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'apsc'@'localhost' IDENTIFIED BY PASSWORD '*09C714AAB4B6F7B4704EAC765B6ECBEC26FBF5E9' |
| GRANT ALL PRIVILEGES ON `apsc`.* TO 'apsc'@'localhost' |
+-------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
mysql>
--------->8<----------
As you can see grants are configured to connect from localhost
now we need to check settings that are set in Plesk DB
--------->8<----------
mysql> use psa;
mysql> select * from misc where param like '%aps%';
+--------------+--------------+
| param | val |
+--------------+--------------+
| aps_database | apsc |
| aps_host | 127.0.0.1 |
| aps_login | apsc |
| aps_password | <YOU CURRENT PASSWORD>|
| aps_port | 3306 |
+--------------+--------------+
5 rows in set (0.00 sec)
mysql>
------->8<-------
as you can see from these lines apsc is trying to connect through 127.0.0.1, so In my case I had to change "127.0.0.1" to "localhost". After this you can confirm if everything is ok by running the following command from shell:
------->8<-------
mysql -hlocalhost -uapsc -p<YOU CURRENT PASSWORD> -P3306 apsc
------->8<-------
P.S. of course it's primitive solution but anyway...