MySQL root user is deleted

  • Hello guys,
    I've searched the forums and the issue tracker but didn't find anything related.


    After upgrading to 1.3.0 (and also with 1.3.1) my MySQL root user account is deleted from the system.
    As written in the errata file, the root account in MySQL souldn't be changed:

    Code
    1. Note that while installing or reconfiguring i-MSCP, the installer will still ask you for the SQL root user info when needed. However, this user will be only used to create and grant privileges to i-MSCP SQL users. This means that i-MSCP will never store any data related to the SQL root user, nor change any of its properties.
    2. Be also aware that in latest versions of the i-MSCP PhpMyAdmin package, usage of SQL root user has been prohibited for security reasons. If you want connect to PhpMyAdmin to work on all databases, you should now use the i-MSCP master SQL user.

    I really like a lot what the errata says, but unfortunately this is not what happening (at least on my systems).


    I don't have logs to provide, if you need any further info please let me know, I'll be pleased to send everything needed.


    System: Debian Jessie x64
    i-MSCP: 1.3.1 FPM, ProFTPD, Dovecot
    Plugins: ClamAV, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, Postscreen, RoundcubePlugins, ServerDefaultPage, SpamAssassin


    Thank you very much,
    bye Kess.

  • @kess


    This problem seem to affect many people. I'll investigate and fix.

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

  • @kess



    With a fresh install of 1.3.1, I've not this problem:



    But.... The problem could arise when upgrading from old installations where the SQL root user was used for some i-MSCP services. Indeed, old user are always dropped. I'll try to reproduce that and fix.

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

  • @kess


    Bug confirmed... This bug is here since many versions... See https://github.com/i-MSCP/imsc…cp-setup-methods.pl#L1082


    To resume, when upgrading or when reconfiguring, we always remove the old SQL user as set in DATABASE_USER parameter. The problem is that in older i-MSCP versions, The DATABASE_USER parameter has been set with root SQL user... Many users have reported the problem already (in different ways):

    • I cannot login to mysql with user root@localhost
    • When I put localhost in installer for sql host, an error is raised
    • My SQL root user is gone
    • ...

    All these issues will be adressed by fixing this bug... I don't even know how I missed that code part...

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

  • This bug has been introduced in version 1.3.0. See https://github.com/i-MSCP/imsc…md#i-mscp-master-sql-user

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

  • Thank you for your investigation and for confirming the bug.
    At present I've re-created the root user on all the MySQL instances, so it's a non problem...


    Regarding the code part you have missed, don't worry, it happens to the bests also :thumbup:

  • A fix has been added in the 1.3.x branch. See https://github.com/i-MSCP/imsc…9f3159aa07fe1dcff42368d25
    This fix will be part of next release.


    Thank you for your report.


    Thread closed.

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

  • See MySQL root funzt nach Update nicht mehr for a way to re-create the SQL root password (only for i-MSCP version >= 1.3.0).

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