Add second DNS Server 2017

Discussion in 'Installation/Configuration' started by zustudios, Jan 14, 2017.

  1. zustudios

    zustudios Member

    thinhtk41 likes this.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The ispconfi manual contains instructions for an ispconfig multiserver setup consisting of web, mail and two dns nodes on Debian Jessie. The installation steps for the two dns nodes can be used to add dns servers to any existing ispconfig master.
     
  3. zustudios

    zustudios Member

    I tried to add the second dns server on ubuntu 16.04 but I got this error:
    PHP Warning: mysqli_connect(): (HY000/1130): Host 'XXX.XXX.XXX.XXX' is not allowed to connect to this MySQL server in /tmp/ispconfig3-stable-3.1-a25a150da40ce205 337a26810149f5a1939fddb7/install/lib/mysql.lib.php on line 107
    PHP Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /tmp/ispconfig3-stable-3.1-a25a150da40ce205337a26810149f5a1939fddb7/install/lib/ mysql.lib.php on line 108
    Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add

    sql-mode="NO_ENGINE_SUBSTITUTION"

    to the mysqld-section in your mysql-config and restart mysqld afterwards
    [email protected]:/tmp/ispconfig3-stable-3.1-a25a150da40ce205337a26810149f5a1939fddb7/ins tall#
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    most likely you missed to allow mysql root logins on the master from ip and hostname of the slave before you started the ispconfig install on the slave.
     
  5. zustudios

    zustudios Member

    How can I fix this?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look at the multiserver tutorials, they all describe how to add a MySQL root user first on the master.
     
  7. zustudios

    zustudios Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally the file is /etc/mysql/my.cnf

    But I doubt that that is your problem, the problem is that one:

    Host 'XXX.XXX.XXX.XXX' is not allowed to connect to this MySQL server
     
  9. zustudios

    zustudios Member

    Host 'XXX.XXX.XXX.XXX' is not allowed to connect to this MySQL server
    is my second dns server. How do I allow it?
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    A ispconfig dlave server connects to two servers, the master server and localhost. So if XXX.XXX.XXX.XXX is not 127.0.0.1 and not the IP of the master, then you did something wrong during setup.
     
  11. zustudios

    zustudios Member

    Do I have to reinstall everything?
    This is from the tutorial:

    mysql -u root -p

    On the MySQL shell, run the following queries:

    CREATE USER 'root'@'1.2.3.5' IDENTIFIED BY 'yourrootsqlpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'1.2.3.5' IDENTIFIED BY 'yourrootsqlpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

    CREATE USER 'root'@'server2.example.com' IDENTIFIED BY 'yourrootsqlpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'server2.example.com' IDENTIFIED BY 'yourrootsqlpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

    FLUSH PRIVILEGES;

    quit;
     
  12. Tuumke

    Tuumke Member

    You have to change the ip adress en yourrootsqlpassword ofcourse :)
    CREATE USER 'root'@'ip-of-secondery-dns' IDENTIFIED BY 'yourrootsqlpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'ip-of-secondary-dns' IDENTIFIED BY 'yourrootsqlpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;

    You have to change the ip adress en yourrootsqlpassword ofcourse :)
    CREATE USER 'root'@'fqdn-of-secondery-dns' IDENTIFIED BY 'yourrootsqlpassword';
    GRANT ALL PRIVILEGES ON * . * TO 'root'@'fqdn-of-secondary-dns' IDENTIFIED BY 'yourrootsqlpassword' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
     
  13. zustudios

    zustudios Member

    I keep getting:
    Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add

    sql-mode="NO_ENGINE_SUBSTITUTION"

    to the mysqld-section in your mysql-config and restart mysqld afterwards
    [email protected]:/tmp/ispconfig3-stable-3.1-a25a150da40ce205337a26810149f5a1939fddb7/install#
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    I wrote already above that the issue is not the sql mode here. Your problem is this error message:

    Host 'XXX.XXX.XXX.XXX' is not allowed to connect to this MySQL server
     
  15. zustudios

    zustudios Member

    How do I fix or track down the problem?
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Check that you are able to login with the mysql command as root user from slave to master. when that works, then proceed with the installation of ispconfig of the slave.
     
  17. zustudios

    zustudios Member

    I did the commands on the master. I can login but I just can't connect it to the slave server Unless I'm doing it wrong. I got it to work for ispconfig 3.0.5.4 but not 3.1
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    thats right, you add the new mysql root user in the mysql server on the master. then you login to the slave server by ssh and test the connection from there as a working mysql root user is a prerequisite to install ispconfig on the slave.
     
  19. zustudios

    zustudios Member

    I added the user then signed in by ssh. How do test the connection between slave and master?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    On the slave:

    mysql -h master.server.tld -u root -p

    replace master.server.tld with the hostname of the master server.
     

Share This Page