Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Multiple Databases to use with Froxlor

Featured Replies

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 :)

this would take a lot of code changes I believe...

you could look at using federated tables to achieve this functionality though...

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.

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

  • Author

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 :)

  • Author

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 ...

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.

  • Author

This should be no problem.

 

great - how? :D

that's my problem. I need such Federated thing for database, not only Tables.

 

That Symlink thing would be one more thing I'd go to hell for :D

  • Author

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 ...

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?

Archived

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.