Topic: Force iRedMail to install (and use) a TCP connection with MySQL
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi,
I am trying to install iRedMail on a machine that is connected to another machine's MariaDB via SSH tunnerl - therefore if I do:
$ mysql -h 127.0.0.1 -uroot -p
I actually connect to MariaDB installed on the remote machine.
Following this page (https://docs.iredmail.org/install.iredm … erver.html) I tried installing iRedMail with:
USE_EXISTING_MYSQL='YES' MYSQL_SERVER_ADDRESS='127.0.0.1' MYSQL_SERVER_PORT='3306' MYSQL_ROOT_USER='admin_iredmail' MYSQL_ROOT_PASSWD='admin_password' MYSQL_GRANT_HOST='127.0.0.1' bash iRedMail.sh
but the installation process keeps trying using the socket instead of establishing a TCP connection:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Is there a way to force the installation - and then the whole solution - to use TCP? Looking at the script it looks like if
MYSQL_SERVER_ADDRESS = 127.0.0.1
it will treat it as localhost - which defaults to socket.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.