mysql& gt;使用mysql;但是...错误1044(42000):用户''的访问被拒绝@' localhost'到数据库' mysql' [英] mysql> use mysql; but ... ERROR 1044 (42000): Access denied for user '' @ 'localhost' to database 'mysql'

查看:72
本文介绍了mysql& gt;使用mysql;但是...错误1044(42000):用户''的访问被拒绝@' localhost'到数据库' mysql'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用mysql.exe我输入命令mysql>使用mysql;但出现错误:

using mysql.exe I enter the command mysql> use mysql; but there is an error:

错误1044(42000):用户'@'localhost'对数据库'mysql'的访问被拒绝

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

  • 这是什么意思?
  • 如何访问mysql数据库?
  • 最重要的是我想重置密码mysql数据库,但是当我输入以下命令时发生错误:mysql> use mysql;
  • 推荐答案

    感谢所有,终于我找到了使用错误的mysql配置重置根密码…它对我来说很好:)

    thanks all, finally I found this reset root password with wrong mysql config… and it works well for me :)

    -转到您的xampp \ mysql \ bin \文件夹
    -编辑my.ini,并在 [mysqld]
    下插入 skip-grant-tables -重新启动MySQL
    -通过运行mysql数据库中phpMyAdmin中的 UPDATE mysql.user SET Password = PASSWORD('new_password')WHERE User ='root'来为您的root用户设置新密码(如果这样,则将其保留为无法从远程主机访问MySQL)

    -Go to your xampp\mysql\bin\ folder
    -Edit my.ini and insert skip-grant-tables below [mysqld]
    -Restart MySQL
    -Set new password for your root user by running UPDATE mysql.user SET Password=PASSWORD('new_password') WHERE User='root' in phpMyAdmin in the mysql database (or just leave it like this if MySQL cannot be accessed from remote hosts)

    AndreKR

    这篇关于mysql& gt;使用mysql;但是...错误1044(42000):用户''的访问被拒绝@' localhost'到数据库' mysql'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆