Bug #38890 Strings not quoted in advisor recommendation
Submitted: 19 Aug 2008 12:02 Modified: 21 Oct 2008 18:03
Reporter: Henrik Ingo Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Enterprise Monitor: Advisors/Rules Severity:S3 (Non-critical)
Version: OS:Linux
Assigned to: CPU Architecture:Any

[19 Aug 2008 12:02] Henrik Ingo
Description:
Testing the MEM 2.0 beta (with platinum rules) I got the advisor:

 INFO Alert - Root Account Can Login Remotely   (v 1.3 *)
Server
kub-007
Time
Aug 19, 2008 2:56:13 PM (1 minute ago)
Status
Open
Advice
Remove remote login capabilities for the root user account.
Recommended Action
DELETE FROM mysql.user WHERE user = root AND host NOT IN (localhost,127.0.0.1);
FLUSH PRIVILEGES;
Notifications
No notifications set.

****

When trying to apply this:

****

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6
Server version: 5.1.23-ndb-6.3.10-telco-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> DELETE FROM mysql.user WHERE user = root AND host NOT IN (localhost,127.0.0.1);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.0.1)' at line 1
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.04 sec)

mysql> DELETE FROM mysql.user WHERE user = root AND host NOT IN ('localhost','127.0.0.1');
ERROR 1054 (42S22): Unknown column 'root' in 'where clause'
mysql> DELETE FROM mysql.user WHERE user = 'root' AND host NOT IN ('localhost','127.0.0.1');
Query OK, 1 row affected (0.00 sec)

How to repeat:
see above
[21 Oct 2008 18:03] Sveta Smirnova
Thank you for the report.

I can not repeat this with Advisors bundle 2.0.0.7079. Bug seems to be fixed.