您好,我已按照 Mysql reset root users to default 上提到的说明进行操作。 。 (Nthalk 回答)但是我收到一个新错误。我的意图是 root 应该获得所有权限。 有什么办法可以解决这个问题吗?
mysql> grant all privileges on *.* to 'root'@'localhost' identified by "" with grant option;
ERROR 1045 (28000): Access denied for user ''@'localhost' (using password: NO)
最佳答案
如果不以 root
身份登录,则无法执行此操作:
mysql -u root
更改密码的最佳方法是:
mysqladmin -u root password 'new password'
关于mysql - 如何授予对mysql的root访问权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20410361/