mysqldump错误1045尽管密码正确,但访问被拒绝等 [英] mysqldump Error 1045 Access denied despite correct passwords etc

查看:1786
本文介绍了mysqldump错误1045尽管密码正确,但访问被拒绝等的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个棘手的问题,我有以下输出:

This is a tricky one, I have the following output:

mysqldump:得到错误:1045:尝试连接时拒绝用户'root'@'localhost'的访问(使用密码:是)

mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect

在Windows XP上尝试使用mysqldump导出数据库时.用户名是root,密码正确,仅包含字母数字字符.我尝试了不同的情况,使用/不使用引号,使用-u-p指定,使用--user=--password=指定,以及其他指定用户/密码的方法,指定主机(全部为本地),甚至使用--databases指定数据库,而不只是空白.使用密码时,错误始终相同,除密码错误外,错误始终相同.我尝试了许多通过搜索找到的修复程序,但均未成功.一种修复建议检查mysql.conf,但Windows构建似乎没有.凭据(实际上是命令行参数)可以与mysql.exe完美配合-这个问题似乎仅在影响mysqldump.exe.

When attempting to export my database with mysqldump on Windows XP. The username is root, the password is correct and contains only alphanumeric characters. I have tried different cases, with/without quotes, specifying using -u and -p, specifying using --user= and --password= and other methods of specifying user/passwords etc, specifying the host (it's all local) and even specifying the database using --databases instead of just blank. The error is always the same when using a password and always the same except the "NO" message when without. I have tried many fixes found through searches with no success. One fix suggested inspecting mysql.conf, but the Windows build doesn't seem to have one. The credentials (and indeed commandline parameters) work perfectly with mysql.exe - this problem only seems to be affecting mysqldump.exe.

推荐答案

这对我有用

mysqldump -u root -p mydbscheme > mydbscheme_dump.sql

发出命令后,要求输入密码:

after issuing the command it asks for a password:

Enter password:

输入密码将创建转储文件.

entering the password will make the dump file.

这篇关于mysqldump错误1045尽管密码正确,但访问被拒绝等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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