If the GRANT ALL doesn't work, try:
- Stop
mysqldand restart it with the--skip-grant-tablesoption. - Connect to the
mysqldserver with just:mysql(i.e. no-poption, and username may not be required). -
Issue the following commands in the mysql client:
UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';FLUSH PRIVILEGES;
After that, you should be able to run GRANT ALL ON *.* TO 'root'@'localhost'; and have it work.
本文指导如何解决MySQL中GRANTALL权限未生效的问题,通过停用GRANT TABLES功能,连接数据库并使用特定命令更新权限,最终实现GRANTALL的正常执行。
886

被折叠的 条评论
为什么被折叠?



