• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

ODBC error #08S01: [unixODBC][MySQL][ODBC 5.3(w) Driver]Can't connect to local MySQL

Polmonino

Basic Pleskian
I'm getting this error after updating MySQL to 5.6 (Plesk 11.5, fresh installation) using the official MySQL repository right after adding a new subscription. However database seems to work fine, I can access phpMyAdmin without problems under Settings -> Database Servers. PHP 5.5 using Remi repository.

Code:
# yum list installed | grep -i mysql
mysql-community-client.x86_64   5.6.17-4.el6                   @mysql56-community
mysql-community-common.x86_64   5.6.17-4.el6                   @mysql56-community
mysql-community-libs.x86_64     5.6.17-4.el6                   @mysql56-community
mysql-community-libs-compat.x86_64
                                5.6.17-4.el6                   @mysql56-community
mysql-community-release.noarch  el6-5                          installed
mysql-community-server.x86_64   5.6.17-4.el6                   @mysql56-community
mysql-connector-odbc.x86_64     5.3.2-1.el6                    @mysql-connectors-community
perl-DBD-MySQL.x86_64           4.013-3.el6                    @base
php-mysqlnd.x86_64              5.5.11-1.el6.remi              @remi-php55

File listing for /usr/lib64 (note: I've manually created the symbolic link /usr/lib64/libmyodbc5.so because was absent):

Code:
# ls -l /usr/lib64/ | grep -i myodbc
-rwxr-xr-x.  1 root root  4294072 Mar 27 15:41 libmyodbc5a.so
lrwxrwxrwx.  1 root root       25 May  2 14:43 libmyodbc5.so -> /usr/lib64/libmyodbc5w.so
-rwxr-xr-x.  1 root root  4292472 Mar 27 15:41 libmyodbc5w.so

Content of /etc/odbcinst.ini:

Code:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver      = /usr/lib/psqlodbc.so
Setup       = /usr/lib/libodbcpsqlS.so
Driver64    = /usr/lib64/psqlodbc.so
Setup64     = /usr/lib64/libodbcpsqlS.so
FileUsage   = 1

[MySQL]
Description = MySQL driver for Plesk
Driver      = /usr/lib64/libmyodbc5.so
Setup       =
FileUsage   = 1
Driver64    = /usr/lib64/libmyodbc5.so
Setup64     =
UsageCount  = 1

[MySQL ODBC 5.3 Unicode Driver]
Driver     = /usr/lib64/libmyodbc5w.so
UsageCount = 1

[MySQL ODBC 5.3 ANSI Driver]
Driver     = /usr/lib64/libmyodbc5a.so
UsageCount = 1

Any help I much appreciated.
 
I've fixed the problem adding a symbolic link to /var/lib/mysql/mysql.sock. Still try to understand what's changed in mysql-connectors-odbc that breaks Plesk 11.5:

Code:
ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
ln -s /usr/lib64/libmyodbc5w.so /usr/lib64/libmyodbc5.so
 
So you've determined that either MySQL server has changed socket location, or that your ODBC driver changed socket location. I am guessing the latter, because your pHPMyAdmin still works fine.
Maybe you can change the ODBC config file? What you can also do is change the MySQL hostname from localhost to 127.0.0.1

This is a subtle differences, but it causes ODBC to connect over TCP/IP instead of using UNIX sockets.
 
Back
Top