While installing Aegir 1.9 on Debian Wheezy, I got this error:

Dummy connection failed to fail. Either your MySQL permissions are   [error]
too lax, or the response was not understood. See http://is.gd/Y6i4FO
for more information. ERROR at line 1: Unknown command '\('.

Related to the dummy connection fail test in
/usr/share/drush/commands/provision/db/mysql/mysql_service.inc, function grant_host():

    $command = sprintf('mysql -u intntnllyInvalid -h %s -P %s -e "SELECT VERSION()"',
      escapeshellarg($this->server->remote_host),
      escapeshellarg($this->server->db_port));

Related issues: #1573004: provision-migrate fails with "Dummy connection failed to fail: mysql: option '-e' requires an argument" and #1515712: Installation fail on Debian wheezy, but the error seems a bit different in this case (and the patch from 1573004 was included in 1.9).

Comments

bgm’s picture

Fwiw, if I replace: SELECT VERSION()

with: SELECT 1, I don't get "ERROR at line 1: Unknown command '\('."

However, if I run "mysql -u foo", I still get a mysql prompt (not connection refused). The user has the following grants:

mysql> show grants;
+--------------------------------------+
| Grants for @localhost                |
+--------------------------------------+
| GRANT USAGE ON *.* TO ''@'localhost' |
+--------------------------------------+
1 row in set (0.00 sec)

That seems to be the default Wheezy policy.

These are probably two different bugs, i.e. the syntax error, and the fact that wheezy by default allows "usage".

anarcat’s picture

Status: Active » Postponed (maintainer needs more info)

I agree we could use SELECT 1 instead of SELECT VERSION(), that should be enough. This bug report worries me, however - we have long assumed that we would get connexion refused on mysql servers for invalid users and it's how we determine the IP the remote MySQL server sees, which is used in turn to create the GRANTS.

This was long time a problem in Ubuntu, and we even have a special step in the manual instructions for this: http://community.aegirproject.org/installing/manual#Ubuntu_RHEL_Arch_lin...

See if running sudo mysql_secure_installation fixes this problem for you, then maybe we'll need to simply update the documentation again. :/

ergonlogic’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

The 1.x branch of Aegir is deprecated. Please re-open if you can re-produce this issue on the latest 2.x or later branches.