Jump to content
Froxlor Forum
  • 0

Multiple Databases to use with Froxlor



Hi Guys,


I wonder what could be the best practise with froxlor to use multiple databases ... for explanation:


Both mailserver and the webserver have their seperate servers. Both have their own mysql-database.


- When a customer edits his email-addresses, froxlor should update this in the mail-mysqldb.

- If he's editing his subdomains, it should update this in the webserver-mysqldb.


Maybe I could copy lib/init.php to lib/init_mail.php, and setup new db-credentials there, and in every single froxlor-file that alters the mail-db I have to include lib/init_mail.php instead of lib/init.php , but that's maybe not the best solution...


How would you do that? Could that maybe possible in next versions of froxlor, to add a specific DB ?

That would be great :)

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

You could synchronize your databases. Unfortunately this will produce some overhead, but if you change record A on database 1, it will be also changed on database 2. Furthermore you will have to point the MX-record to the second server, so that it will be used as mailserver.


In short:

- install both server (minimal) with Froxlor

- configure databases to be synchronized

- install webserver etc. on server 1

- install mailserver etc. on server 2

- change MX records

- be happy


Probably this would be a way to go.

Link to comment
Share on other sites

using a master/slave setup with the mysql database would give you the benefit if each server being able to operate if the other is offline... I wouldn't install froxlor on both systems though as you would only want to be able to write to one anyway


federated tables are just remote tables and after re-reading what you are wanting it would probably not benefit you, you would be better off having 1 database server and having an independent web and mail server which both hit the remote database, Froxlor would reside on the web server and you would just ensure your mail server is configured to auto create maildirs on delivery or login... this would eliminate the overhead of the second database and synchronizing but would add network traffic which probably would be internal and not effect your clients...


either way you still will want to change your MX records which you may just want to change the code the generates them based on a custom setting so you don't have to change it for each domain you create

Link to comment
Share on other sites

Thanks very much for the replies,


I didn't know the existing of Federated Tables. That actually sounds exactly what I want.


I don't know why I should update MX Records - they are correct and pointing to the mail-VE - something I don't see?


I want the mailserver to have it's own very small, light database for 1) security 2) performance and 3) scalability reasons.

In case of a hardware defect I can switch on the rsynced VE on another Rootserver and it works immediately (I added backup MX's too).


So the way for me really sounds like Federated tables - I will give that a try :-)


thanks again, dudes :)

Link to comment
Share on other sites

mhm ... I think you're right. I should have one mysqldb, and each mail+web-VE connecting to that.

But there ain't Federated Databases, right? :D


Maybe I could set symlinks between each VEs on /var/run/mysqld/mysql.sock

uh that sounds dirty ...

Link to comment
Share on other sites

This would be possible (one database, both hosts connecting to it). To do this, you will have to enable both servers to connect to the database. Then you could configure your mailserver to connect to the other database. This should be no problem.


Otherwise, as already said, a master-slave-configuration would work. See MySQL documentation on that topic for more information.

Link to comment
Share on other sites

As already said, there are two possibilities:

1.) Simply configure Froxlor 2 to use MySQL 1.

2.) Simply use synchronized databases (http://www.lmgtfy.com/?q=mysql+replication)


Thanks for that gentle hint with your letmegooglethatforyou-link.

It's not that I'm stupid or lazy.


If you have only ONE mysql server/database (and two servers which should connect to this), how exactly would you replicate/synchronize?


I really appreciate your help, but ... you know ...

Link to comment
Share on other sites

Sorry, didn't want to offend you.


Okay, this would be case 1. When installing Froxlor, you have to enter your database connection settings. What's exactly the problem with entering the same MySQL server in both installations?

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...