Empty ispcsrv2 password on multi-server environment
Following the tutorial there: https://www.howtoforge.com/multiserver-setup-with-dedicated-web-email-dns-and-mysql-database-servers-on-debian-squeeze-with-ispconfig-3-p2
- Created a master server with mysql root password p1
- Grant permissions to root@[local-ip-of-slave-server] and root@[domain-of-slave-server] identified with password p3
- Created a slave server, installed with mysql root password p2, then connecting to master server as root with password p3
- Install goes well, but afterwards any update fails :
Access denied for user 'ispcsrv2'@'[domain-of-slave-server]' (using password: YES) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 85
- Checked the master's DB: there are 2 entries in mysql.user for ispcsrv2, both have an empty password. Permissions have been set by ISPConfig properly, so ispcsrv2 can CRUD on some master's tables.
- Checked the slave's DB: there is no entry for such user (ispcsrv2), thus explaining why the master can't login.
I'm using an internal network to which each VM is connected.
- Master /etc/hosts :
127.0.0.1 localhost
192.168.1.179 [master-domain]
192.168.1.176 [slave-domain]
- Slave /etc/hosts :
127.0.0.1 localhost
192.168.1.176 [slave-domain]
192.168.1.179 [master-domain]
Last time I used this setup (it worked):
- I set permissions on the master DB for user root@[any-slave-ip-or-host] with the same password as master's root
- The IP used were all public (so each hosts file had the other VMs referenced by public IP)
I'm not sure whether the problem comes from a wrong hosts file, or the permissions set on the master's DB/password used to create the slave. What seems pretty sure is that it's weird having an empty password for ispcsrv2. Maybe this is not a bug, and the tutorial might have to be updated to tell how to avoid this caveat.
I've resolved this by getting ispcsrv2 password from /usr/local/ispconfig/server/lib/config.inc.php and updating the user in the master DB, and it worked. But I think this would be nice to find out where the problem comes from (gonna try to investigate this myself, but maybe you guys know best where to check :) ).
Anyway, thanks a lot for this amazingly useful piece of software. I keep supporting HowToForge :)