主题: 求问policyd如何连接非标准的mysql数据库实例?

我目前使用的数据库实例是3311.socket使用的是/tmp/mysql.sock.3311/etc/policyd.conf内容是#MYSQLHOST=

回复: 求问policyd如何连接非标准的mysql数据库实例?

我目前使用的数据库实例是3311.socket使用的是/tmp/mysql.sock.3311

/etc/policyd.conf
内容是
#MYSQLHOST="localhost:/tmp/mysql.sock.3311"
#MYSQLHOST="localhost:3311"
MYSQLHOST="localhost"
# database name:
#   name of database to connect to
MYSQLDBASE="policyd"
# database username:
#   username to connect to database as
MYSQLUSER="policyd"
# database password:
#   password to for username
MYSQLPASS="p8RXejahq42L1lWvgdHhZCuopR5m2o"
# connection options:
#   what client side connections policyd will use>
#
#     CLIENT_COMPRESS -> compress connection from policyd -> mysql
#     CLIENT_SSL      ->  encrypt connection from policyd -> mysql
#
MYSQLOPT="3311"

无论
MYSQLHOST="localhost:/tmp/mysql.sock.3311"
还是
MYSQLHOST="localhost:3311"
还是
MYSQLHOST="localhost"

在/var/log/maillog上都为
Nov 22 11:18:50 dellserver policyd: starting policyd v1.82
Nov 22 11:18:50 dellserver policyd: connecting to mysql database: localhost:/tmp/mysql.sock.3311
Nov 22 03:18:50 dellserver policyd: mysql_real_connect(): Unknown MySQL server host 'localhost:/tmp/mysql.sock.3311' (3)

求问。如何才能连接到自定义的mysql套接字上??

回复: 求问policyd如何连接非标准的mysql数据库实例?

配置文件里的注释没有给出使用 socket 的示例,建议在 policyd 的邮件列表里问一下。