Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

Internal error: ODBC error #08S01: [unixODBC][MySQL][ODBC 5.3(w) Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Message ODBC error #08S01: [unixODBC][MySQL][ODBC 5.3(w) Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
File     aps_php.php
Line    11933
Type    Exception

However database seems to work fine, I can access phpMyAdmin without problems under Settings -> Database Servers. PHP 5.5 using Remi repository.

# 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
                                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

Libraries installed (note: I've manually created the symbolic link /usr/lib64/ because was absent):

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

Content of /etc/odbcinst.ini:

Description = ODBC for PostgreSQL
Driver      = /usr/lib/
Setup       = /usr/lib/
Driver64    = /usr/lib64/
Setup64     = /usr/lib64/
FileUsage   = 1

Description = MySQL driver for Plesk
Driver      = /usr/lib64/
Setup       =
FileUsage   = 1
Driver64    = /usr/lib64/
Setup64     =
UsageCount  = 1

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

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

Any help I much appreciated.

share|improve this question

closed as off-topic by HopelessN00b Jan 14 '15 at 9:10

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

This question appears to be off-topic because it is about working with a service provider's management interface, such as cPanel. – HopelessN00b Jan 14 '15 at 9:10
up vote 1 down vote accepted

Wow. Just discussing yesterday

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
share|improve this answer
Great. Curious to know what causes the problem. – bleemboy Jul 21 '15 at 13:32
As I see it's happens when mysql and odbc connector installed from different sources, so ODBC libs (libmyodbc5) points to old mysql.sock location because this path is compiled within lib binary. – Oleg Neumyvakin Jul 21 '15 at 16:51
It is my case. I have Plesk on CentOS 5 but I did an update to MySQL 5.5 form another repo (CentOS 6 repo offered only MySQL 5.1). I remember missing ODBC consequently to update was fixed by Parallels support (so was probably the Plesk repo). But this was months ago. Recently I did a restart and then I noticed the problem. Maybe the restart deleted /temp files. There is a way to make this fix permanent or I should reinstall (and how) MySQL or ODBC from right sources? – bleemboy Jul 21 '15 at 17:27
To keep link after server restart add following string in the beginning of /etc/init.d/mysqld: if [ ! -L /tmp/mysql.sock ]; then ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock ; fi – Oleg Neumyvakin Jul 22 '15 at 7:00
ok. It is worthless to reinstall? – bleemboy Jul 22 '15 at 7:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.