Symptoms
-
When accessing Application Vault or any APS application, such as Drupal, WordPress the following error appears in Plesk (the path to the file may vary):
PLESK_INFO: Internal error:
ODBC error #01000: [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib64/libmyodbc5.so’ : file not found
Message ODBC error #01000: [unixODBC][Driver Manager]Can’t open lib ‘/usr/lib64/libmyodbc5.so’ : file not found
File aps_php.php
Line 12157
Type Exception -
The same error message can be found in the
/var/log/plesk/panel.log
: -
In case Power User view is used, https://203.0.113.2:8443/smb/ is showing the “502 Bad Gateway” error.
-
Backups are created with a warning:
PLESK_INFO: Warning: domain “example.com”
Unable to get APS instances on webspace id 1 (ErrorCode: 1, STDOUT:). -
Additionally, following error can be found in
/usr/local/psa/PMM/sessions/<date>/stderr
ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found
[2018-09-08 04:54:50.302] ERR [panel] Unable to get apsc.aps_registry_package row from psa.smb_apsPackage with ID = 58. Details: Exception: ODBC error #01000: [unixODBC][Driver Manager]Can't open lib '/usr/lib64/libmyodbc5.so' : file not found in /usr/share/aps_php/aps_php.php:12519
Cause
The path to the MySQL ODBC driver is incorrect.
Resolution
-
Connect to a Plesk server via SSH.
-
Find a proper path to the MySQL driver:
# ls /usr/lib*/libmyodbc*w.so
/usr/lib64/libmyodbc5w.soNote: The path may also differ based on the MySQL ODBC Connector version installed.
Warning: ODBC 8.x is not supported.
-
Open the file
/etc/odbcinst.ini
in a text editor (for example, “vi” editor) and replace an old path under the [MySQL] section with a correct path from step 2:[MySQL]
Description = MySQL driver for Plesk
Driver = /usr/lib64/libmyodbc5w.so
Setup =
FileUsage = 1
Driver64 = /usr/lib64/libmyodbc5w.so
Setup64 =
UsageCount = 1 -
Create a symbolic link to the mysql.sock file:
# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock