1.mysql 执行 grant all on *.* to u_test@localhost;
报错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
但是 执行 grant select on *.* to u_test@localhost;
又是没有问题的,
我们 执行下show grants;
,
发现执行结果里面没有包含 grant all ,所以猜测 root用户也没有grant all权限,那就把 show grants 里面的执行结果复制出来,然后把root 改成我们要授权的那个用户u_test就可以了