Posts by major

    Ok, i see, there we have the issue.


    My MariaDB only has one root user (root@%). The production MariaDB is actually a galera cluster with no local access, so no root@localhost exists. When I say I cloned the MariaDB server, I actually ment I added a galera cluster node, synced all data and then split the node from the cluster. This leaves me with a single MariaDB server, that I can use for testing.


    Of course, this also leaves me with only the root@% account, which will be removed by the installer code you linked (https://github.com/i-MSCP/imsc…d/mysql/installer.pm#L770)



    Summing this up leaves me with the question, whether it is a good idea to connect i-MSCP to such a database cluster. Actually, I don't want to allow i-MSCP root access to the cluster, I only do this at the moment while testing.


    In your opinion, is this a good or a bad idea? :) Will it break many of the automatic installer or upgrade scripts?

    Hi,


    I'm sorry, here is a little bit of context:


    I plan to migrate an ISPCP and two ISPConfig instances to i-MSCP. All three systems currently use an external database server, external nameserver and external mailserver. In the new setup, I like to keep mailserver, database server and nameserver independent. To plan/prepare the migration, I built a test environment, where I setup i-MSCP (1.4.7), which I later upgraded to 1.5.1.


    At one stage, I wanted to try to connect i-MSCP to the existing external database server. To do so:

    • I first created a clone of the MariaDB server
      • The system has about 2000 databases, a whole lot of users, and of course a root user
      • It never knew about the i-MSCP database or any i-MSCP user
    • I mysqldump'ed the i-MSCP database from the i-MSCP server and imported it into the MariaDB server.
    • I ran /usr/local/src/imscp-1.5.1/engine/setup/imscp-reconfigure to update i-MSCPs database server settings.
      (As the MariaDB server didn't even know any i-MSCP user, I thought this would be the easiest way to create the i-MSCP database user and update the i-MSCP config)
      • The script asks for db IP address, port, root-username and root-password, imscp-username, imscp-password, imscp-database-name, imscp-web-admin and web-password
      • After I enter all this data, the script fails with "Servers::sqld::mysql::installer::_setupDatabase Couldn't connect to SQL server"
      • -> From now on, the MariaDBs root user is gone.


    The i-MSCP server is Debian 9.1 with i-MSCP 1.5.1 and MariaDB 10.2 (10.2.9+maria~stretch)
    The MariaDB server to which I want to connect i-MSCP is Debian 9.1 with MariaDB 10.1 (10.1.26-0+deb9u1)


    All this is only a test setup at the moment, but I thought it might be a good idea to inform you about the issue.


    Regards, Sven.

    Hi,


    thanks for the fast reply!


    Old DB is MySQL 5.5 on Ubuntu 14.04
    New DB is MariaDB 10.1 on Debian 9.1


    I copied the complete /var/lib/mysql directory from the old server to the new one, then started MariaDB on the new server, and executed mysql_upgrade.
    Next, I executed /usr/local/src/imscp-1.5.1/engine/setup/imscp-reconfigure, which failed with



    Access denied for user 'imscp_user'@'193.239.xxx.xxx' (using password: YES)
    I guess, when running an external DB server, I might need to add privileges for 'imscp_user'@'%' manually? However, after the installer exited, I was no longer able to login to the MariaDB server, because user root was gone.