ISPConfig 3: Adding Second Server

Discussion in 'Installation/Configuration' started by crisko, Jun 24, 2009.

  1. crisko

    crisko New Member

    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 Using a slightly tailored version of Falko's Ubuntu 8.10 / ISPC3 setup, I have configured a second server,

    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:

    mysql -h -u root -p
    The output is as follows:

    ERROR 1130 (00000): Host '' is not allowed to connect to this MySQL server
    From an SSH terminal on MX1:
    netstat -tap | grep mysql
    The output is as follows:
    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.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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 and then for the IP of Afterwards reload mysql.
  3. crisko

    crisko New Member

    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:

    update user set Host='' where user='root';
    update db set Host='' 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:

    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?

  4. crisko

    crisko New Member

    Managed to sort out the DB issues.

    So back to square one.

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

    till Super Moderator Staff Member ISPConfig Developer

    Which question?
  6. crisko

    crisko New Member

    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.

  7. till

    till Super Moderator Staff Member ISPConfig Developer

    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.

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

    centosarus New Member


    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:

    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?


  9. till

    till Super Moderator Staff Member ISPConfig Developer

    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.

Share This Page