Search Engine: Elastic

Article ID: 130854, created on May 22, 2017, last review on May 22, 2017

  • Applies to:
  • Operations Automation


webmail-config package (re)installation task fails with the output:

Command '/bin/sh -c mysql -D'mysql' -u'root' -p'******' -h'' < /tmp/horde.install.sql ' execution failed with code 1: ERROR 1130 (00000): Host '' is not allowed to connect to this MySQL server


Incorrect user and host rights on the webmail node. MySQL service specific migration instructions were not completed in full, so the original rights were not restored.


  1. Access the node in question (webmail node in this example).
  2. Connect to the MySQL server with user root and the password configured originally.
  3. Check the current privileges of the 'root' user:

    mysql> use mysql
    mysql> select * from user where User = 'root';
  4. Assign full privileges to the user:

    mysql> GRANT ALL ON *.* to root@'' IDENTIFIED BY 'XXXXXXXXX';
    Query OK, 0 rows affected (0.00 sec)
    Query OK, 0 rows affected (0.00 sec)
  5. Try to simulate the task activity:

    [root@webmail01 ~]# mysql -u root -p -h192.0.2.2 < /tmp/horde.install.sql
    Enter password:
    ERROR 1044 (42000) at line 7: Access denied for user 'root'@'' to database 'horde'
  6. In case it still fails as above, it is needed to check the Grant_priv privelege specifically:

    mysql> SELECT `User`, `Grant_priv` FROM `mysql`.`user` WHERE `User` = 'root';
    | User | Grant_priv |
    | root | Y          |
    | root | Y          |
    | root | Y          |
    | root | Y          |
    | root | Y          |
    | root | N          |

    If there is at least one 'N' entry, fix it:

    mysql> UPDATE `mysql`.`user` SET `Grant_priv` = 'Y' WHERE `User` = 'root';
    Query OK, 1 row affected (0.00 sec)
    Rows matched: 6  Changed: 1  Warnings: 0
    Query OK, 0 rows affected (0.00 sec)
  7. Re-run the task, it should end successfully.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF