Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th June 2009, 15:57
crisko crisko is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 24th June 2009, 16:16
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

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 Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 25th June 2009, 04:19
crisko crisko is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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!
Reply With Quote
  #4  
Old 25th June 2009, 08:33
crisko crisko is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Managed to sort out the DB issues.

So back to square one.

But again, to my question regarding the dbsicponfig... ideas?
Reply With Quote
  #5  
Old 25th June 2009, 10:54
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

Quote:
But again, to my question regarding the dbsicponfig... ideas?
Which question?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 25th June 2009, 11:12
crisko crisko is offline
Junior Member
 
Join Date: Jun 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #7  
Old 25th June 2009, 11:22
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #8  
Old 1st July 2009, 00:52
centosarus centosarus is offline
Member
 
Join Date: Apr 2009
Posts: 46
Thanks: 9
Thanked 4 Times in 3 Posts
Default

Quote:
Originally Posted by till View Post
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.
Reply With Quote
  #9  
Old 1st July 2009, 12:11
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,794
Thanks: 840
Thanked 5,612 Times in 4,423 Posts
 
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
centosarus (1st July 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection dropped by IMAP server gublym Server Operation 5 23rd January 2009 10:47
ispconfig - server migration best way sygram Installation/Configuration 3 26th October 2007 12:37
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 23:53
Strato Server - Restoring with SystemImager popper2001 HOWTO-Related Questions 5 28th July 2007 11:18
Install ISPConfig on CentOS Server, in brief gfts Tips/Tricks/Mods 11 4th April 2006 09:29


All times are GMT +2. The time now is 12:52.


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