2012-11-25 91 views
2

我试着在mysql中端以下语句:mysql如何撤销文件

revoke file on *.* to 'john'@'localhost'; 

但我得到的错误:

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 'to 'john'@'localhost'' at line 1 

什么是REVOKE语句的正确语法?我尝试阅读MySQL文档,但不明白。

回答

3

在您的查询中,将to替换为from。就像这样:

revoke file on *.* from 'john'@'localhost'; 

关于此命令的详细信息,请参见MySQL docs for REVOKE