Howdy, Ive been using iRedmail for some years, its a great product !
Ha Ha, this reply is 4 years late but even if it helps just one person save some pain and time. Here are the files Ive need to edit when moving an MySQL DB for iRedmail, Ive done it a few times successfully. Keep in mind I simply "moved" the SQL db location, so the IP and port had changed - in this case mySql is hosted in a Kubernetes (container) cloud infrastructure.
On the iRedmail host(s) I used the following commands to find instances of my current (known) MysQL IP then use a tool like sed to quickly change to the new IP (and port if required) - after file edit restart dovecot and postfix.
Keep in mind this is not a complete SQL migration plan, just simply how to change the IP and port. All iRedmail stack services sql passwords remained the same in my case as mySQL hosting was simply "moved"
grep <your_mysql_ip_addr> /etc/postfix/mysql/*
grep <your_mysql_ip_addr> /etc/dovecot/dovecot-mysql.conf
grep <your_mysql_ip_addr> /etc/dovecot/dovecot-share-folder.conf
grep <your_mysql_ip_addr> /etc/dovecot/dovecot-used-quota.conf
grep <your_mysql_ip_addr> /opt/www/roundcubemail/config/config.inc.php
grep <your_mysql_ip_addr> /opt/www/iredadmin/settings.py
grep <your_mysql_ip_addr> /etc/amavis/conf.d/50-user
grep <your_mysql_ip_addr> /root/.my.cnf
grep <your_mysql_ip_addr> /root/.my.cnf-amavisd
grep <your_mysql_ip_addr> /root/.my.cnf-iredadmin
grep <your_mysql_ip_addr> /root/.my.cnf-roundcube
grep <your_mysql_ip_addr> /root/.my.cnf-vmail
grep <your_mysql_ip_addr> /root/.my.cnf-vmailadmin
grep <your_mysql_ip_addr> /opt/mlmmjadmin/settings.py
then change the IP to the new mySQL location.