Adding a new server (multiserver)

Discussion in 'Installation/Configuration' started by OscarMas, Oct 13, 2009.

  1. OscarMas

    OscarMas New Member


    I'm using ISPConfig and Debian Lenny in a fresh instal, all work ok. But when add new server to this ha say a error:

    ispconfig-2:/usr/local/src/ispconfig3_install/install# php -q install.php
    Select language (en,de) [en]:
    Installation mode (standard,expert) [standard]: expert
    Full qualified hostname (FQDN) of the server, eg server1.domain.tld []:
    MySQL server hostname [localhost]:
    MySQL root username [root]:
    MySQL root password []: password
    MySQL database to create [dbispconfig]:
    MySQL charset [utf8]:
    Shall this server join an existing ISPConfig multiserver setup (y,n) [n]: y
    MySQL master server hostname []:
    MySQL master server root username [root]:
    MySQL master server root password []: password
    MySQL master server database name [dbispconfig]:
    Adding ISPConfig server record to database.
    ERROR: Unable to create database user in master database: ispcsrv4 Error: GRANT command denied to user 'root'@'' for table 'server'

    I verify the correct access of the user root to the remote database from new install to the server with ispconfig:

    ispconfig-2:~# mysql -h -u root -p

    thats works fine, the slave (ispconfig-2) access to ispconfig-1 and add data, every error I remove the data of table server.... and drop the local database ( following this post: )

    ispconfig-1:~# mysql
    USE dbispconfig;
    DELETE FROM server WHERE server_name = '';

    ispconfig-2:~# mysql
    DROP DATABASE dbispconfig;

    To grant access to root I add to mysql of ispconfig-1:

    ispconfig-1:~# mysql
    GRANT ALL ON *.* TO root@'' IDENTIFIED BY 'password';

    Thanks in advance
    Last edited: Oct 13, 2009
  2. damir

    damir New Member

    Im usually adding slave to master by inserting following SQL command in
    mysql user table on master server:

    INSERT INTO `user` (`Host`, `User`, `Password`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`, `Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`, `Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`, `Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`, `Repl_client_priv`, `Create_view_priv`, `Show_view_priv`, `Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `max_questions`, `max_updates`, `max_connections`, `max_user_connections`) VALUES
    ('', 'root', 'md5password', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0),
    ('', 'root', '* md5password', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', '', '', '', '', 0, 0, 0, 0);
    Only thing to change is host part and password that you copy from root user of master server.

    Im adding one where the host is IP, and second with the FQDN.

    I never fails when im connection slaves to master :)
  3. OscarMas

    OscarMas New Member

    Sorry but the table user don't exist, remember..... I'm using ISPConfig not ISPConfig 2

    mysql> SHOW TABLES;
    | Tables_in_dbispconfig |
    | attempts_login |
    | client |
    | client_template |
    | country |
    | cron |
    | dns_rr |
    | dns_soa |
    | dns_template |
    | firewall |
    | ftp_user |
    | mail_access |
    | mail_content_filter |
    | mail_domain |
    | mail_forwarding |
    | mail_get |
    | mail_greylist |
    | mail_mailman_domain |
    | mail_traffic |
    | mail_transport |
    | mail_user |
    | mail_user_filter |
    | monitor_data |
    | remote_session |
    | remote_user |
    | server |
    | server_ip |
    | shell_user |
    | software_package |
    | software_repo |
    | software_update |
    | software_update_inst |
    | spamfilter_policy |
    | spamfilter_users |
    | spamfilter_wblist |
    | support_message |
    | sys_config |
    | sys_datalog |
    | sys_dbsync |
    | sys_filesync |
    | sys_group |
    | sys_ini |
    | sys_log |
    | sys_user |
    | web_database |
    | web_domain |
    | web_traffic |
    46 rows in set (0.00 sec)
    Last edited: Oct 13, 2009
  4. Franz

    Franz Member

    this is in mysql database :)
  5. OscarMas

    OscarMas New Member

    Can you show me the structure database, because I want create manually

    mysql> DESCRIBE user;

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not add this manually, it will simply not work as the tables contain server specifc data that is inserted by the installer. You have to use the ispconfig installer to create or modify the database and to add new slaves to the master database.
  7. OscarMas

    OscarMas New Member

    ok..... I can't create manually, but howto add slave ispconfig to master ispconfig ?

    The procedure of the top of post is correct ?
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The procedure is correct but not the permissions of the root user to connect to the master server. Please add make sure that the root user has all permissions incl. grant permissions when he connects from the slave to the master database.
  9. OscarMas

    OscarMas New Member

    Thanks till, the problem was related to permissions on the Master ISPConfig.

    One question more......

    Having the DB on master, once used the wizard in order to create the slave (succesfully), how can we create a DB replica in the slave ? (using the wizard ?, manualy ?.). Do you have any procedure ?
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You dont have to do any additional step, everything is configured and the databse gets replicated automatically.

Share This Page