Reconfigure SQL Server failes - 1.3.x Branch

  • Hello there


    if you try to change the sql server you have to re enter the database root user.
    The user is disabled by the imscp setup (since 1.3.x)


    If you want to change the sql server (e.g. 5.5 to 5.7) you have to reenter the root user.
    The root user cannot login and the update / reconfigure fails.


    greets


    /edit
    sql manager -> sql server

    Edited once, last by Levitas ().

  • @Levitas


    You're wrong ;)

    • The SQL root user is not disabled. It is just not longer used by i-MSCP (excepted during installation when really needed)
    • When you're asked for the SQL root user, you must provide the correct info. Here, I presume that you entered a bad hostname. Try with 127.0.0.1 too ;) It is a known issue. E.g, in some contexts (for instance, with MySQL 5.7), the root@localhost entry is not created (or removed) (only the [email protected] entry stay there).

    To resume, when asked for the root SQL user by the i-MSCP installer, you must enter in order:

    • The username: root
    • The password: <your SQL root password>
    • The hostname: localhost or 127.0.0.1 if localhost doesn't work

    i-MSCP doesn't alters any data for the SQL root user (that user is created by Debian package maintainer script).


    BTW: What is the SQL manager for you :?:

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

  • No !


    You must still enter root for the username but when you're asked for the hostname, you must enter 127.0.0.1. There is one dialog for the SQL root username and another for the hostname.

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

  • @Levitas


    There is something strange (127.0.0.1 seems mapped to localhost on your system). Well, could you provide me an access?

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

  • @Levitas


    Problem found. On your SQL installation, there is no common entries for the SQL root user. There is only an entry for root@::1 at this moment:



    SQL
    1. mysql> select user, host from user;+------------------+-----------+| user | host |+------------------+-----------+| <dummy> | % || <dummy> | 127.0.0.1 || <dummy> | 127.0.0.1 || root | ::1 || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || debian-sys-maint | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost || <dummy> | localhost |+------------------+-----------+28 rows in set (0,00 sec)mysql> \q

    Note: <dummy> users are another users.


    I've fixed the problem by re-creating the missing users using the debian-sys-maint user:

    SQL
    1. # mysql -h 127.0.0.1 -u debian-sys-maint -p<password>mysql> CREATE USER 'root'@'localhost' IDENTIFIED BY '<password>';Query OK, 0 rows affected (0,00 sec)mysql> GRANT ALL PRIVILEGES on *.* to 'root'@'localhost' WITH GRANT OPTION;Query OK, 0 rows affected (0,00 sec)mysql> CREATE USER 'root'@'127.0.0.1' IDENTIFIED BY '<password>';Query OK, 0 rows affected (0,01 sec)mysql> GRANT ALL PRIVILEGES on *.* to 'root'@'127.0.0.1' WITH GRANT OPTION;Query OK, 0 rows affected (0,01 sec)mysql> flush privileges;Query OK, 0 rows affected (0,00 sec)mysql> \q


    Once done, I was able to connect using root@localhost user:



    You can now rerun the i-MSCP installer.

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

  • i think i got a similiar problem, after upgrading to 1.3.0 i can't login with the root user anymore...



    Code
    1. +------+-----------+
    2. | user | host |
    3. +------+-----------+
    4. | root | 127.0.0.1 |
    5. | root | ::1 |
    6. +------+-----------+
    7. 2 rows in set (0.00 sec)

    this users are created, other user like the new imscp_user works..

  • @batZen


    For unknow reason, root@localhost entry is removed. Use 127.0.0.1.

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