HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   ISPConfig 3: Adding Second Server (http://www.howtoforge.com/forums/showthread.php?t=36962)

crisko 24th June 2009 14:57

ISPConfig 3: Adding Second Server
 
I have a question to which the answer I am sure is simple: I have had a server up and running for about 4 months now running ISPC3, primary functions are Web Serving and Email.

This server is named mx1.myisp.com. Using a slightly tailored version of Falko's Ubuntu 8.10 / ISPC3 setup, I have configured a second server, mx2.myisp.com

I have done everything but install ISPConfig.

What I am hoping is to devise some sort of replication / failover setup.

But I have hit a roadblock - it's a very simple problem. I know what the problem is, I just would like verification on how to correct it.

I need to setup up the DB on MX1 to allow MX2 to access it, so that I can add the second server.

From an SSH terminal on MX2:

Code:

mysql -h mx1.myisp.com -u root -p
The output is as follows:

Code:

ERROR 1130 (00000): Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
From an SSH terminal on MX1:
Code:

netstat -tap | grep mysql
The output is as follows:
Code:

tcp        0      0 *:mysql                *:*                    LISTEN      4275/mysqld
Any tips would be greatly appreciated. I searched the site, google and the ubuntu forums, wasn't able to find exactly what I was looking for.

till 24th June 2009 15:16

You have to allow root logins from the IP and hostname of the secondary server in the mysql user table of the master database. This can be done e.g. by making a copy of the database record for the localhost root logins and inserting it again for hostname mx2.myisp.com and then for the IP of mx2.myisp.com. Afterwards reload mysql.

crisko 25th June 2009 03:19

Well, it looks like I have taken a step backwards.

I fired up mysql and navigated to the host table of mysql.

I then entered:

Code:

update user set Host='mx2.myisp.com' where user='root';

update db set Host='mx2.myisp.com' where Db='mysql';

I then restarted the service.

Now two things are happening:

First, when I try to access the DB from MX1 I get:

Code:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
Second, when in the expert installation of MX2, when trying to connect to MX1 it aborts stating tables have been created.

Is there a way flush the privlages in mysql to allow root to login once again, also do I want to specify a seperate DB when adding the second server to the setup?

Thanks!

crisko 25th June 2009 07:33

Managed to sort out the DB issues.

So back to square one.

But again, to my question regarding the dbsicponfig... ideas?

till 25th June 2009 09:54

Quote:

But again, to my question regarding the dbsicponfig... ideas?
Which question?

crisko 25th June 2009 10:12

When I attempt to the add the second server, it states that tables already exist and the installation aborts.

What is the best practice / method to use as I am trying to replicate the databases already created.

Thanks.

till 25th June 2009 10:22

Quote:

When I attempt to the add the second server, it states that tables already exist and the installation aborts.
Then you most likely entered the wrong server details. The installer asks you for two servers, the first server is localhost and then it will ask you later if you want to join a master server and then you enter the details of the master server.

Quote:

What is the best practice / method to use as I am trying to replicate the databases already created.
Not sure why you want to replicate them as the master slave setup in ispconfig is not a mirror setup. The setup is for administering multiple servers from one controlpanel and not for mirroring servers for high availability.

centosarus 30th June 2009 23:52

Quote:

Originally Posted by till (Post 196244)
You have to allow root logins from the IP and hostname of the secondary server in the mysql user table of the master database. This can be done e.g. by making a copy of the database record for the localhost root logins and inserting it again for hostname mx2.myisp.com and then for the IP of mx2.myisp.com. Afterwards reload mysql.

Till,

Is that all that is needed to be done on the master server?

For some reason, the term "master server" in a 2 (or more) ISPConfig3 servers configuration made me think about replication as well. I was going to model my databases setup according to this tutorial (I am using Centos): How To Set Up MySQL Database Replication On Fedora 10, which can be found here: http://www.howtoforge.com/how-to-set...n-on-fedora-10

But, if I understand correctly, this is not needed. One simply needs to allow root login (per the quote above) from the slave (second or third or 4th ...) server to the master (the one from which all servers will be administered through that single control panel.)

Am I right?

Is there anything else that needs to be taken into account to have such a setup?

Thanks.

Jude.

till 1st July 2009 11:11

Quote:

But, if I understand correctly, this is not needed. One simply needs to allow root login (per the quote above) from the slave (second or third or 4th ...) server to the master (the one from which all servers will be administered through that single control panel.)
Yes, thats correct. ISPConfig is doing the replication automatically. You do not have to setup mysql replication. If you setup mysql replication ispconfig would not work.

This thread is about a different topic. Its about replication in a high availability setup were all nodes host the same sites while ispconfig is doing a multi server setup were every node hosts diferent sites.


All times are GMT +2. The time now is 00:03.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.