添加订阅时出现 Plesk 错误:ODBC 错误 #08S01 无法连接到本地 MySQL

添加订阅时出现 Plesk 错误:ODBC 错误 #08S01 无法连接到本地 MySQL

使用以下方法将 MySQL 更新至 5.6(Plesk 11.5,全新安装)后,出现此错误官方 MySQL 存储库添加新订阅后立即进行。

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

但是数据库似乎运行良好,我可以在设置->数据库服务器下毫无问题地访问 phpMyAdmin。PHP 5.5 使用 Remi 存储库。

# 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

/usr/lib64/libmyodbc5.so已安装的库(注意:由于缺失,我已手动创建符号链接):

# 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

内容/etc/odbcinst.ini

[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

任何帮助我都十分感激。

答案1

哇。昨天刚讨论过https://stackoverflow.com/questions/23428301/correct-way-of-updating-php-mysql-on-a-running-plesk-11-5-server

ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

相关内容