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

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

WBOY
Release: 2016-06-07 17:27:27
Original
1128 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template