执行该语句时revoke all on itcast .* from 'heima'@'localhost';即撤销heima用户在itcast数据库中所有权限;
出现错误[42000][1141] There is no such grant defined for user 'heima' on host 'localhost'
这里提供一种可能的解法
当heima用户在itcast数据库本就没有权限时撤销其所有权限无意义;故只需要给heima用户授权即可进行撤销操作;此做法只适用于仅是尝试操作的需求;
命令如下:
grant all on itcast.* to 'heima'@'localhost';
revoke all on itcast .* from 'heima'@'localhost';