New install with remote database

  • 14.04 and 16.04 and 1.3.16.tar.gz on install errors out (Static IP and Real Domain are used)



    Error was:
    main::setupDatabase: [ERROR] Could not establish connection to the database: SQLSTATE[HY000] [1045] Access denied for user
    'imscp_user'@'serv1.example.com' (using password: YES)


    connection to remote database is ok it does create users imscp_user,vftp_user,dovecot_user,pma_user,roundcube_user,rainloop_user but creates them with IP 'imscp_user'@'ip address' not 'imscp_user'@'serv1.example.com'


    even if you add those users before running install it then errors with



    Setting up permissions
    Error was:
    main::setupSetPermissions: Error while setting permissions: [ERROR] iMSCP::Rights::setRights: group option refers to inexistent group: mysql at
    /var/www/imscp/engine/setup/../PerlLib/iMSCP/Rights.pm line 75.

  • Before answering, I'll give a try ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @DZII


    Setting up permissions
    Error was:
    main::setupSetPermissions: Error while setting permissions: [ERROR] iMSCP::Rights::setRights: group option refers to inexistent group: mysql at
    /var/www/imscp/engine/setup/../PerlLib/iMSCP/Rights.pm line 75.

    Confirmed. The `mysql' group is only created by the mysql-server package (preinst maintainer script). Thus, when selecting remote SQL server on first i-MSCP installation (on a server where a MysQL server was never installed), that group is missing. Quick fix:

    Shell-Script
    1. # addgroup --system mysql >/dev/null

    This will be fixed in next release.


    Error was:
    main::setupDatabase: [ERROR] Could not establish connection to the database: SQLSTATE[HY000] [1045] Access denied for user
    'imscp_user'@'serv1.example.com' (using password: YES)

    I cannot reproduce the problem with the 1.4.x branch. I've done the following:


    MySQL server (sql.i-mscp.fr)

    • I've installed a new Debian Jessie 8.7
    • I've set the hostname to sql.i-mscp.fr
    • I've set appropriate DNS record in the i-mscp.fr zone: sql.i-mscp.fr. IN A <sql_server_ip>
    • I've Installed MySQL server and I've set the bind-address parameter to 0.0.0.0 in the /etc/mysql/my.cnf file (listening to all interfaces)
    • I've restarted the MysQL server: service mysql restart
    • I've created a new SQL user as follow:
    SQL
    1. # mysql -u root -p<password>> GRANT ALL PRIVILEGES ON *.* TO 'remote_user'@'precise.bbox.nuxwin.com' IDENTIFIED BY '<password>' WITH GRANT OPTION;> \q

    i-MSCP server (precise.bbox.nuxwin.com)

    • I've installed a new Ubuntu Precise
    • I've set the hostname to precise.bbox.nuxwin.com
    • I've set appropriate DNS record in the bbox.nuxwin.com zone: precise.bbox.nuxwin.com. IN A <imscp_server_ip>
    • I've installed i-MSCP with the following parameters for the SQL server (remote):
      • SQL server hostname: sql.i-mscp.fr
      • SQL server port: 3306
      • SQL root username: remote_user
      • SQL root user password: <password>
      • Username for master i-MSCP SQL user: master_user
      • Password for the master i-MSCP SQL user: automatically generated
      • Host from which SQL user created by i-MSCP must be allowed to connect: precise.bbox.nuxwin.com
      • Database name for i-MSCP: remote_imscp

    Result Success without any error nor warn.


    connection to remote database is ok it does create users imscp_user,vftp_user,dovecot_user,pma_user,roundcube_user,rainloop_user but creates them with IP 'imscp_user'@'ip address' not 'imscp_user'@'serv1.example.com'


    I cannot confirm the problem with the 1.4.x branch. SQL users are created with the expected host:

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @DZII


    Regarding the `mysql' group issue:


    A fix has been added in our development branch. See https://github.com/i-MSCP/imsc…1906e023fad2293e02885da13
    This fix will be part of next release.


    Thank you for your report.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • just to confirm you used debian 8.7 for mysql server and Ubuntu Precise 12.04 for i-mscp ? Any reason why you used 12.04 ?

    • sql.i-mscp.fr (remote sql server) was a Debian Jessie 8.7 server
    • precise.bbox.nuxwin.com (i-MSCP server) was a Ubuntu Precise Pangolin 12.04 server

    There is no particular reason in my choice. This was just because I've a set of pre-installed servers (virtualbox snapshoot). The OS doesn't matter ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206