• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Plesk 12 DB error Zend_Db_Adapter_Exception

TarasS

Basic Pleskian
When I go to Plesk control panel I see the following error message:

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] Permission denied (Abstract.php:147)

Search for related Knowledge Base articles

Do you have any ideas how to fix this problem?
I haven't found valuable answers on KB.

If I check psa database using command:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -e "show tables;"
I see long tables list output such as:
+-----------------------------------+
| Tables_in_psa |
+-----------------------------------+
| APSApplicationItems |
| APSCatalogUpdates |
| APSClientApplicationItems |
| APSLicenseTypes |
| APSLicenses |
| ApiRpcCallsStat |
| ApsTokens |
| BackendCache |
| BackupsScheduled |
| BackupsSettings |
| Cards |
| ClientsTraffic |
| Configurations |
| DashboardPreset |
| DashboardPresetConfig |
| DatabaseServers |
| DatabaseUserRemoteAccessRules |
| DomainOutgoingMessagesPeaks |
| DomainOutgoingMessagesStats |
| DomainServices |
| DomainsTraffic |
| DynamicIpSecurity |
| GL_remote_domains |
| GL_settings |
| IP_Addresses |
| IisAppPoolDomains |
| IisAppPools |
| IisAppPoolsPolicy |
| IpAddressesCollections |
| IpCollections |
| Limits |
| LimitsReservation |
| Logos |
| MailLists |
| MailMessagesStat |
| MailOutgoingMessagesPeaks |
| MailOutgoingMessagesStats |
| ModuleSettings |
| Modules |
| Notes |
| Notifications |
| PMM |
| PMMDefault |
| Parameters |
| Permissions |
| PersistentCache |
| PhpSettings |
| PhpSettingsParameters |
| PlanItemProperties |
| PlanItems |
| PlanServiceInstallations |
| PlanServiceProperties |
| PlansSubscriptions |
| PleskPagesStat |
| PleskStats |
| Repository |
| RestrictedDomains |
| SBConfig |
| SBResellers |
| SBSites |
| SSOBranding |
| ServiceInstallationProperties |
| ServiceInstallations |
| ServiceInstanceDepends |
| ServiceInstanceProperties |
| ServiceInstanceResources |
| ServiceInstances |
| ServiceLimits |
| ServiceNodeCache |
| ServiceNodeCertificates |
| ServiceNodeConfiguration |
| ServiceNodeEnvironment |
| ServiceNodes |
| ServicePermissions |
| SessionContexts |
| SharedSslDomains |
| SiteAppFiles |
| SiteAppPackages |
| SiteAppResources |
| SiteApps |
| SiteAppsHitsStat |
| SitePagesStat |
| Skins |
| SubscriptionOutgoingMessagesPeaks |
| SubscriptionOutgoingMessagesStats |
| SubscriptionProperties |
| Subscriptions |
| Templates |
| TmplData |
| WebApps |
| WebServerSettings |
| WebServerSettingsParameters |
| Webmails |
| WordpressInstanceProperties |
| WordpressInstances |
| WordpressInstancesDomains |
| accounts |
| actions |
| admin_aliases |
| admin_aliases_param |
| ai_vendor_sources |
| anon_ftp |
| apsContexts |
| apsContextsApplications |
| apsInstancesParameters |
| apsResources |
| apsResourcesParameters |
| apscategories |
| avstatistics |
| badmailfrom |
| certificates |
| cf_dsn |
| cf_dsn_params |
| cl_param |
| clients |
| cp_access |
| custom_buttons |
| data_bases |
| db_users |
| disk_usage |
| dns_recs |
| dns_recs_t |
| dns_refs |
| dns_zone |
| dom_level_usrs |
| dom_param |
| domain_aliases |
| domains |
| dsn |
| event_handlers |
| exp_event |
| externalWebmails |
| fileSharingUsers |
| forwarding |
| fpse_users |
| ftp_users |
| hosting |
| hotlink_friends |
| hotlink_prot |
| ip_pool |
| itmpl |
| itmpl_data |
| key_history |
| key_history_params |
| locales |
| log_actions |
| log_components |
| log_rotation |
| longtaskparams |
| longtasks |
| mail |
| mail_aliases |
| mail_redir |
| mail_resp |
| mass_mail |
| mass_mail_clients |
| mass_mail_domains |
| migration_version |
| misc |
| mn_param |
| module_watchdog_disk |
| module_watchdog_disk_event |
| module_watchdog_param |
| module_watchdog_report |
| module_watchdog_service |
| module_watchdog_service_event |
| module_watchdog_sys_stat |
| password_secrets |
| pd_users |
| protected_dirs |
| report |
| report_auto |
| report_section |
| resp_attach |
| resp_forward |
| resp_freq |
| secret_keys |
| sessions |
| shared_ssl_links |
| siteapppackages_apscategories |
| smb_apsBundleFilterItems |
| smb_apsBundleFilters |
| smb_apsCategories |
| smb_apsContexts |
| smb_apsInstanceErrors |
| smb_apsInstances |
| smb_apsMetas |
| smb_apsPackageUpdates |
| smb_apsPackages |
| smb_apsPackagesCategories |
| smb_apsProvisionEnvironments |
| smb_apsProvisions |
| smb_apsResourceParameters |
| smb_apsResources |
| smb_apsSettings |
| smb_componentUpdates |
| smb_emailAliases |
| smb_fileSharingUnlistedFiles |
| smb_generalPermissions |
| smb_locales |
| smb_productUpgrades |
| smb_roleGeneralPermissions |
| smb_roleServicePermissions |
| smb_roles |
| smb_serviceEntryPoints |
| smb_serviceInstances |
| smb_servicePermissionAccounts |
| smb_servicePermissions |
| smb_serviceProviders |
| smb_settings |
| smb_userServicePermissions |
| smb_users |
| smtp_poplocks |
| spamfilter |
| spamfilter_preferences |
| stat |
| subdomains |
| suspend_handler_history |
| sys_users |
| upgrade_history |
| web_users |
| webalizer_group_referrer |
| webalizer_hidden_referrer |
| wsb_param |
+-----------------------------------+
 
Hi TarasS,

this KB - article may help:

ERROR: Zend_Db_Adapter_Exception: SQLSTATE[HY000] [2002] No such file or directory ( KB - article 120 312 )


If this didn't help you, try to use as well the bootstrapper repair procedure, which solves quite a lot of issues/problems on your server:

/usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair


If you still experience issues, please include log - files and/or configuration files for a more detailed investigation to your issue:

 
Thank you for your answer, @UFHH01,

pdo_mysql was missing in my version of /usr/local/psa/admin/conf/php.ini configuration file.
I have found it using command
# ps ax | grep mysql.sock | grep -v grep
17374 pts/11 Sl 2:55 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/lib/mysql/designlogic.us.pid --socket=/var/lib/mysql/mysql.sock
And now it is in:
# grep pdo_mysql /usr/local/psa/admin/conf/php.ini
pdo_mysql.default_socket = "/var/lib/mysql/mysql.sock"

# /etc/init.d/sw-engine restart
Stopping sw-engine-fpm: [ OK ]
Starting sw-engine-fpm: [ OK ]
# /etc/init.d/sw-cp-server restart
Stopping sw-cp-serverd: [ OK ]
Starting sw-cp-serverd: [ OK ]
#


It is not solved all of my problems with Plesk.
 
When I go to login page: https://my-server-ip.com:8443/login_up.php3
I can log in but i see: https://my-server-ip.com:8443/smb/ 502 Bad Gateway error instead of control panel.

Each time I try to log in I see messages in error log /var/log/sw-cp-server/error_log like below:
2015/05/21 12:46:14 [error] 15860#0: *13 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 11.22.13.4, server: , request: "GET /smb/ HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "my-server-ip.com:8443", referrer: "https://my-server-ip.com:8443/login_up.php3"

I have the following MySQL packages installed:
# rpm -qa |grep -i mysql
MySQL-shared-5.5.43-1.el6.x86_64
MySQL-client-5.5.43-1.el6.x86_64
mysql-connector-odbc-5.1.5r1144-7.el6.x86_64
MySQL-devel-5.5.43-1.el6.x86_64
MySQL-server-5.5.43-1.el6.x86_64
perl-DBD-MySQL-4.013-3.el6.x86_64
php-mysql-5.3.3-40.el6_6.x86_64
MySQL-shared-compat-5.5.43-1.el6.x86_64
#
Os version:
# cat /etc/redhat-release
CentOS release 6.6 (Final)
# uname -a
Linux my-server-ip.com 3.16.3-elastic #1 SMP PREEMPT Wed Oct 1 10:33:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
#
 
I've also tried to run:
# /usr/local/psa/bootstrapper/pp12.0.18-bootstrapper/bootstrapper.sh repair

It gives me the following error log:
START Bootstrapper 12.0.18 repair AT Thu May 21 12:40:13 UTC 2015

**** Product repair started.

===> Checking for previous installation ... found.
Started bootstrapper repair procedure. This may take a while.
Certain actions may be skipped if not applicable.

Trying to start service mysql... SUCCESS! MySQL running (17374)
done
Trying to establish test connection... connected
done
Trying to start service mysql... SUCCESS! MySQL running (17374)
done
Trying to establish test connection... connected
done
Trying to find psa database... version is 012000018
Version is OK, no need to create psa database.
Trying to backup MySQL database... Warning: Not dumping MySQL database 'atmail' as it doesn't exist
done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.12.0.18-12.0.18.20150521-124014.dump.gz
Finishing up upgrade procedures and rerunning previously failed upgrade actions...
===> Cumulative APS controller database (apsc) upgrade and repair has been started.
Upgrade or repair for 'apsc' (stage 'prep') is not required
Trying to backup MySQL database... done
MySQL databases are dumped to /var/lib/psa/dumps/mysql.preupgrade.apsc.12.0.18-12.0.18.20150521-124017.dump.gz
===> Cumulative upgrade and repair of APS controller database has been completed.
/usr/bin/sw-engine: relocation error: /usr/lib64/libmyodbc5.so: symbol strmov, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference
Trying to reset database user password for 'apsc@'... done
APSC database has been registered successfully
/usr/bin/sw-engine: relocation error: /usr/lib64/libmyodbc5.so: symbol strmov, version libmysqlclient_16 not defined in file libmysqlclient_r.so.16 with link time reference

WARNING!
Some problems are found during fix credentials for APS controller database(see log file: /var/log/plesk/install/plesk_12.0.18_repair.log)

Continue...

===> Cumulative APS controller upgrade and repair (final stage) has been started.
Upgrade or repair for 'apsc' (stage 'post') is not required
===> Cumulative upgrade and repair of APS controller (final stage) has been completed.
ERROR 1045 (28000): Access denied for user 'pp_sb_db'@'localhost' (using password: YES)
Trying to reset database user password for 'pp_sb_db@localhost'... done
ERROR 1045 (28000): Access denied for user 'pp_sb_db'@'localhost' (using password: YES)

ERROR while trying to fix credentials for WPB database
Check the error reason(see log file: /var/log/plesk/install/plesk_12.0.18_repair.log), fix and try again


===> Restoring database from backup /var/lib/psa/dumps/mysql.preupgrade.12.0.18-12.0.18.20150521-124014.dump.gz


**** Product repair failed.

***** problem report *****
ERROR while trying to fix credentials for WPB database
Check the error reason(see log file: /var/log/plesk/install/plesk_12.0.18_repair.log), fix and try again
STOP Bootstrapper 12.0.18 repair AT Thu May 21 12:40:40 UTC 2015
 
UFHH01,

Thank you for useful advice. I've finally solved my problems with Plesk panel.
It is now working fine.
 
Back
Top