1

Topic: Can not run mysql due to socket error - ERROR 2002 (HY000):

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MYSQL edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version:  Ubuntu 18.04.2 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MYSQL
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? NO
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Can not run mysql

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Tried to use localhost and 127.0.0.1, same error.

Tried safemode (mysqld_safe --skip-grant-tables &), same error.

Any help appreciated.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Can not run mysql due to socket error - ERROR 2002 (HY000):

Please check MySQL server log file, the error should be logged in log file, it will help troubleshoot.

3

Re: Can not run mysql due to socket error - ERROR 2002 (HY000):

Thank you.

I believe I need to reverse this (from : https://forum.iredmail.org/post49198.html#p49198)

Fix is to remove the unix_socket option:

  update mysql.user set plugin = '' where user = 'root';
  flush privileges;

But I can not login to mysql now.

ZhangHuangbin wrote:

Please check MySQL server log file, the error should be logged in log file, it will help troubleshoot.

4

Re: Can not run mysql due to socket error - ERROR 2002 (HY000):

Issue fixed with a support ticket (https://www.iredmail.org/support.html). smile