ZhangHuangbin wrote:jaideyan wrote:However, new iRedMail install created the databases on the remote server, and also on the iRedMail server.
This is weird enough and not right. Did you run iRedMail installer multiple times?
With a given remote MySQL server, iRedMail will use only remote sql server and do not touch local one. And there's no config for the local sql server to sync databases from remote one. So it doesn't make any sense.
I have done this few times on new servers fresh new installs, and I get similar results. Could there be a bug? Below are my servers:
1. Remote MYSQL server is AWS RDS. Servername or endpoint is:
a. mailserverdb.xx0xxxx6xxxx.eu-west-2.rds.amazonaws.com (listening on port 3306
b. admin_iredmail with privileges/permissions created on this server, and able to connect with no issues
2. iRedMail Server is: AWS Red Hat Enterprise Linux 7.3 (fresh OS);
On this server I run:
USE_EXISTING_MYSQL='mailserverdb.xx0xxxx6xxxx.eu-west-2.rds.amazonaws.com' \ (AWS RDS servername)
MYSQL_SERVER_ADDRESS='mailserverdb.xx0xxxx6xxxx.eu-west-2.rds.amazonaws.com' \
MYSQL_SERVER_PORT='3306' \
MYSQL_ROOT_USER='admin_iredmail' \
MYSQL_ROOT_PASSWD='xxxxxxxxxx' \
MYSQL_GRANT_HOST='101.10.10.101' \
bash iRedMail.sh
db and users are created on the remote and the iredmail server. See outputs below:
From iRedMail server:
MySQL [(none)]> select user, host from mysql.user;
+----------------+--------------+
| user | host |
+----------------+--------------+
| admin_iredmail | % |
| naijamail | % |
| amavisd | 172.31.0.173 |
| iredadmin | 172.31.0.173 |
| iredapd | 172.31.0.173 |
| roundcube | 172.31.0.173 |
| vmail | 172.31.0.173 |
| vmailadmin | 172.31.0.173 |
| iredmailadmin | localhost |
| mysql.sys | localhost |
| rdsadmin | localhost |
+----------------+--------------+
From my remote MYSQL server:
# mysql -h mailserverdb.xxxxxxxxxxxxxxeu-west-2.rds.amazonaws.com -P 3306 -u xxxxxxxx -p
MySQL [(none)]> select user, host from mysql.user;
+----------------+--------------+
| user | host |
+----------------+--------------+
| admin_iredmail | % |
| naijamail | % |
| amavisd | 172.31.0.173 |
| iredadmin | 172.31.0.173 |
| iredapd | 172.31.0.173 |
| roundcube | 172.31.0.173 |
| vmail | 172.31.0.173 |
| vmailadmin | 172.31.0.173 |
| iredmailadmin | localhost |
| mysql.sys | localhost |
| rdsadmin | localhost |
+----------------+--------------+
11 rows in set (0.00 sec)
during installation of iRedMail, there's a place that asks for, "Would you like to use MySQL configuration file shipped within iRedMail now?".
File: /etc/my.cnf. [Y|n]. I choose 'y'
During the iRedMail Configurations section, I get this error message:
"ERROR 1419 (HY000) at line 398 in file: '/root/iRedMail-0.9.7/runtime/iredmail.sql': You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)"