提示 :Access denied for user 'root'@'localhost' (using password:YES) mysql运行 grant all privileges on username.* to 'database' @'%' identified by 'password';
username用户名,database数据库名称, password密码
如果要删除某个用户test的权限的话
DELETE FROM mysql.user WHERE User='test'; DELETE FROM mysql.db WHERE User='test'; DELETE FROM mysql.tables_priv WHERE User='test'; DELETE FROM mysql.columns_priv WHERE User='test'; DELETE FROM mysql.procs_priv WHERE User='test';
flush privileges; 刷新mysql,让权限设置立刻生肖