Home >Database >Mysql Tutorial >ERROR 1044 (42000): Access denied for user ''@'localhost' to

ERROR 1044 (42000): Access denied for user ''@'localhost' to

WBOY
WBOYOriginal
2016-06-07 17:27:271122browse

ERROR 1044 (42000): Access denied for user

有时候生产上经常遇到类似的错误,主要是由于在mysl库中user表内出现了权限变更空值,mysql拒绝你进入该库进行操作,包括及时我们进入了mysql,仍然无法执行类似以下的语句;

UPDATE user SET Password=PASSWORD('newpassword') where USER='root';

在切换mysql的时候,use mysql仍然不行,,导致无法正常做一些正常的操作。这是需要变更user表,或者执行网上类似

mysqld_safe --skip-grant-table把一些权限暂时屏蔽点,在新窗口中在进行操作!比较粗暴简单的办法是,把相关的远程会话窗口直接关闭,然后在重新连接登录,重启mysql服务,即可!

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn