Server status inconsistent if /etc/mysql/conf.d does not exist
Both the Admin Console and zmcontrol status report that the mysql service is down. However the service is actually running.
zmcontrol status Host zimbra.server.com antispam Running antivirus Running convertd Running ldap Running logger Running mailbox Stopped mysql.server is not running. mta Running snmp Running spell Running stats Stopped zmconfigd Running
mysql.server status mysql is running with pid 22851
ps as | grep mysql S pts/0 0:00 /bin/sh /opt/zimbra/mysql/bin/mysqld_safe --defaults-file=/opt/zimbra/conf/my.cnf --external-locking --log-error=/opt/zimbra/log/mysql_error.log --malloc-lib=/opt/zimbra/tcmalloc/lib/libtcmalloc_minimal.so --ledir=/opt/zimbra/mysql/bin Sl pts/0 0:02 /opt/zimbra/mysql/bin/mysqld --defaults-file=/opt/zimbra/conf/my.cnf --basedir=/opt/zimbra/mysql --datadir=/opt/zimbra/db/data --plugin-dir=/opt/zimbra/mysql/lib/plugin --external-locking --log-error=/opt/zimbra/log/mysql_error.log --pid-file=/opt/zimbra/db/mysql.pid --socket=/opt/zimbra/db/mysql.sock --port=7306
/opt/zimbra/bin/mysqladmin status Can't read dir of '/etc/mysql/conf.d/' (Errcode: 2)
If the conf.d directory is created then the error goes away. You will see similar errors when trying to reset mysql password, or when trying to start the service manually using "mysql.server".
This has only been seen on Ubuntu installs.
The directory '/etc/mysql/conf.d/' is not required by zcs to be present, all libraries and config files for zimbra are contained within the "/opt/zimbra" folder and the service does not rely on distro's config files.
The reason zimbra binaries go searching for the directory is because of a library conflict. If the below two mysql client libraries are installed, this can result in them overriding the zimbra libraries.
zimbra@zimbra:~$ dpkg --get-selections | grep -i mysql libmysqlclient16 deinstall mysql-common deinstall
Since "deinstall" means these packages were marked to be removed :
dpkg --purge mysql-common dpkg --purge libmysqlclient16
Doing so will remove these packages, and hence resolve the conflicting libraries.