Problems installing ispconfig in a mysql cluster setup

Discussion in 'Installation/Configuration' started by Jose Ferre, Sep 23, 2016.

  1. Jose Ferre

    Jose Ferre New Member

    Hi HowtoForge community,

    A briefly summarize of my installation:
    I have a mysql cluster setup with two management nodes, four sql nodes and two data nodes and I have installed a mysql-proxy on the management nodes for a failover between the two data nodes, then I'm using the port 4040 (mysql-proxy) for send queries to the data nodes.

    I'm trying to install ISPConfig, setting the ip and the port 4040 of a mysql-proxy host.
    I checked the access from mysql client and I checked the access by this script, both are correct.

    <?php
    $con = mysqli_connect("host","user","password","","4040");

    // Check connection
    if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    ?>​

    But after configure a few steps on the install.php appears a few error: PHP Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'host' (111) in /tmp/ispconfig3-stable-3.1-2475fad8ab15be8500182d75c65f52b716405544/install/lib/mysql.lib.php on line 79 and PHP Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'host' (111) in /tmp/ispconfig3-stable-3.1-2475fad8ab15be8500182d75c65f52b716405544/install/lib/mysql.lib.php on line 85.

    After this, I edited this file /tmp/ispconfig3-stable-3.1-2475fad8ab15be8500182d75c65f52b716405544/install/lib/mysql.lib.php and I changed the lines that contain mysqli_connect (mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass)) for this other ($this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass, "", "4040")).
    I have done this because it seems that the installer ignore the port that I have chosed on the installation steps (MySQL server port [3306]: 4040).

    I returned to run the install.php and now show this another error: ERROR: Unable to load SQL-Dump into database table, but after accessing to db dbispconfig I checked that this db contains a lot of tables.
    The log (/var/log/ispconfig...) shows this: [ISPConfig] - /tmp/ispconfig3-stable-3.1-2475fad8ab15be8500182d75c65f52b716405544/install/lib/installer_base.lib.php, Line 254: WARNING: could not read in ispconfig3.sql
    I tried with expert mode installation, setting the correct user and password for access to the database but obtain same error.

    Sorry for the inconvenience.

    Any ideas?
    Somebody can help me?

    Thank you! :)
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    Each ispconfig-server needs it's local database.
     
  3. Jose Ferre

    Jose Ferre New Member

    Hello florian030,

    Thanks for the reply.
    I have accomplished install ispconfig after comment this lines on install.php file.

    //** if(count($db_tables) == 0) {
    //** $this->error('Unable to load SQL-Dump into database table.');
    //**}

    The database was not empty. Apparently I think is an issue with mysql-proxy.

    I'll have to check it. ;)

    Thanks!
     

Share This Page