1

Topic: upgrade_iredapd.sh unable to use non-local SQL server

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: Debian 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

Hello Zhang!

I upgraded iRedAPD 1.4.4 to 1.8.0
I am using a SQL server which is not installed locally

The upgrade-script expect the SQL server to be installed locally and does not ask for the foreign server address

root@mail:~/iRedAPD-1.8.0/tools# bash upgrade_iredapd.sh
* Detected Linux/BSD distribution: DEBIAN
* Found iRedAPD directory: /opt/iredapd, symbol link of iRedAPD-1.4.4
* Found iRedAPD config file: /opt/iredapd/settings.py
Looks like you don't have 'iredapd' SQL database, please type root
username and password of your SQL server to create it now.
MySQL root username: root
MySQL root password: xxxxxx
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I modified the script by hand and added the host setting (-h 10.1.1.2) to two mysql commands.
Futher on in the script the SQL server address is honored.

Please consider updating the script to make life easier for people which use a non-local SQL server smile

Best regards,

Bernhard

----

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

2

Re: upgrade_iredapd.sh unable to use non-local SQL server

Fixed moment ago. Thanks for the feedback. smile
https://bitbucket.org/zhb/iredapd/commi … 1f062d3fa0

3

Re: upgrade_iredapd.sh unable to use non-local SQL server

Great, thank you! smile