Mysql in a different host inaccessible

Discussion in 'HOWTO-Related Questions' started by zenny, Mar 14, 2010.

  1. zenny

    zenny Member

    [SOLVED] Mysql in a different host inaccessible

    I am following Falko's wonderful tutorial:


    to create VEs, and


    to install different services in the different VEs. eg.

    a) VE101 hosts web services like http, ftp (netftp), 1st dns and ispconfig3 (a wonderful product :)
    b) VE102 hosts db services like mysql
    c) VE103 hosts mail services like postfix, courier, squirrelmal/roundcube
    d) VE104 hosts 2nd dns server
    5) VE105 hosts a telephone server

    Installation of web, ftp and dns services were successful except quota (as there is nothing in VE1's /etc/fstab under openvz???), but when I try to install ispconfig3 in VE101, I could not access the db server in VE102 to create the dbispconfig database with an error message:

    Unable to connect to mysql server Host '' is not allowed to connect to this MySQL server
    I tried to open mysql port 3306 on the VE2 (db server) with:
    #/sbin/iptables -A INPUT -i venet0 -s -p tcp --destination-port 3306 -j ACCEPT
    Still I get to the same error. :-(

    In the meantime, I did the following in the VE2 db server:

    #mysql -u root -p
    #grant all on *.* to [email protected] identified by 'password';
    It let me go beyond the selection of db, but I got the the following error in next step:

    And the last solution mentioned here ( does not apply to my case as I am yet to install the ispconfig3 and there is any links as mentioned to the clientdb.

    And I am just confused whether I have to install everything [including the webservers in the db server (VE102 in my case] in case I try to go after Till's advice:

    Please suggest. Thanks!!!

    Last edited: Mar 15, 2010
  2. zenny

    zenny Member

    tried this too

    I tried as stated here, too: by installing mysql-client on VE101 (web server) and unsuccesful. I can connect using 'mysql -h -u root -p' where the IP is my db server VE.

    Then I tried to do as instructed here:

    Still, I am getting :

    Has anyone encountered such a problem?
  3. zenny

    zenny Member

    Works with others, but not ispconfig3 3.0.2 installation

    In order to check whether this problem is dbserver-side or ispconfig3 installation script, I downloaded icebb to the VE101 (webserver where I want to install ispconfig 3) and installed the db in VE102. The installation went smoothly without any hitches. The following is the output from the VE102 (db server)

    mysql> show grants for [email protected];
    | Grants for [email protected]                                                                                            |
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'' IDENTIFIED BY PASSWORD '*E1TB0C38323EC954FM1908F585476Q42037713J6' | 
    | GRANT ALL PRIVILEGES ON `dbispconfig`.* TO 'root'@''                                                        | 
    | GRANT ALL PRIVILEGES ON `icebb`.* TO 'root'@''                                                              | 
    3 rows in set (0.00 sec)
    If I could install icebb with the same database and permissions, then there could be something with the ispconfig3 installer that prevents me installing ispconfig3 on a remote db host (in my case

    Likewise, I can access the db server (in VE102) after making necessary changes in the /etc/phpmyadmin/ in VE101as of below:
    $cfg['Servers'][$i]['host']          = '';
    $cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
    $cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
    $cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
    $cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
    $cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection (requires PHP >= 4.3.0)
    $cfg['Servers'][$i]['auth_type']     = 'config';
    $cfg['Servers'][$i]['user']          = 'root';
    $cfg['Servers'][$i]['password']      = 'password';
    Thus, it seems like it is the problem with the ISPConfig3 installer. I am struggling to install ISPConfig3 for some 36 hours in such a setup, but in vain. Any inputs will be highly appreciated. I really like and need ISPConfig. Thanks!
    Last edited: Mar 15, 2010
  4. zenny

    zenny Member

    [SOLUTION] Mysql in a different host inaccessible

    Just whining for a day and half and found a solution by executing the following command at mysql prompt on the VE running db-server:

    #mysql -u root -p <ENTER>
    However, once the ispconfig3 gets installed, the [email protected] user in the db-server should be renamed to [email protected] to get rid of the error that is encountered while login to ISPconfig3 gui.

    all previous tweaks were reverted back.

    However, I am trying to figure out how can I configure the mail server in VE103 as I installed without configuring mail while installing ISPConfig3. Any hints will be appreciated.


Share This Page