简体   繁体   English

mysqldbcopy-错误1045:拒绝用户'root'@'localhost'的访问(使用密码:NO)

[英]mysqldbcopy - Error 1045: Access denied for user 'root'@'localhost' (using password: NO)

i am using mysql workbench which has the command mysqldbcopy under linux. 我正在使用在Linux下具有命令mysqldbcopy mysql工作台。 when i am trying to use it, i have to supply a connection string (see the examples here ). 当我尝试使用它时,我必须提供一个连接字符串(请参见此处的示例)。

my password contains ampersand (&), thus i am invoking mysqldbcopy as follows (for character escaping propose) 我的密码包含“&”号,因此我按如下方式调用mysqldbcopy (用于字符转义建议)

mysqldbcopy \
    --source "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" \
    --destination "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" \
    old:new

but i receive the following error, which by googling, i found that it means that i do not supply the right password (correct me if i am wrong) 但是我收到以下错误,通过谷歌搜索,我发现这意味着我没有提供正确的密码(如果我输入错了,请更正我)

# Source on localhost: ... ERROR: Cannot connect to the Source server.
Error 1045: Access denied for user 'root'@'localhost' (using password: NO)

could one please shed the light of where is the problem? 能否请您阐明问题出在哪里?

and yes, i am sure that the password is correct, it has been copied from .my.cnf , and i am able to use it under mysql command 是的,我确定密码是正确的,它是从.my.cnf复制而来的,我可以在mysql命令下使用它

mysqldbcopy mysqldbcopy

--source=root':&1qqq34rtyy'@localhost:3310:/var/run/mysqld/mysqld.sock  
--destination=root':&1qqq34rtyy'@localhost:3310:/var/run/mysqld/mysqld.sock 
 old:new  --force

I have also faced same issue, 我也遇到过同样的问题

The above mentioned syntax executes smoothly without any error. 上面提到的语法可以顺利执行,没有任何错误。 Use --force , if the destination database name already exists & needs to overwrite forcefully. 如果目标数据库名称已经存在并且需要强制覆盖 ,请使用--force

By looking at the link you provided, I can conclude this - 通过查看您提供的链接,我可以得出以下结论:

You are using - 您正在使用 -

mysqldbcopy \
    --source "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" \
    --destination "root:&1qqq34rtyy@localhost:3310:/var/run/mysqld/mysqld.sock" \
    old:new

But the link shows, 但链接显示,

mysqldbcopy \   
    --source=root:pass@localhost:3310:/test123/mysql.sock \ 
    --destination=root:pass@localhost:3310:/test123/mysql.sock \   
   util_test:util_test_copy

Conclusions, 结论,

  1. After --source and --destination , the example in the link you provided have '=' . --source--destination ,您提供的链接中的示例带有'='

  2. Try with single quotes if double quotes doesn't help. 如果双引号没有帮助,请尝试使用单引号。

  3. Verify if the port 3310 is correct. 验证端口3310是否正确。 Default I guess when you install is 3306. Can you confirm? 默认值是3306。安装时可以确认吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ERROR 1045(28000):用户'root'@'localhost'拒绝访问(使用密码:NO) - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 错误1045(28000):用户'= root'@'localhost'的访问被拒绝(使用密码:否) - ERROR 1045 (28000): Access denied for user '=root'@'localhost' (using password: NO) #1045-用户'root'@'localhost'的访问被拒绝(使用密码:是) - #1045 - Access denied for user 'root'@'localhost' (using password: YES) OperationalError:(1045,“拒绝用户'root'@'localhost'的访问(使用密码:NO)”) - OperationalError: (1045, “Access denied for user 'root'@'localhost' (using password: NO)”) Django(1045,“用户'root'@'localhost'的访问被拒绝(使用密码:NO)”) - Django (1045, "Access denied for user 'root'@'localhost' (using password: NO)") #1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:是) - #1045 - Access denied for user 'root'@'localhost' (using password: YES) 1045, "拒绝访问用户 'root'@'localhost' (使用密码: NO)") - 1045, "Access denied for user 'root'@'localhost' (using password: NO)") ERROR 1045 (28000): 用户 'root'@'localhost' 访问被拒绝(使用密码:YES); 无法重设密码 - ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES); Can't reset password OperationalError:(1045,“拒绝用户'root'@'localhost'的访问(使用密码:是)”) - OperationalError: (1045, “Access denied for user 'root'@'localhost' (using password: YES)”) LAMP#1045-用户'root'@'localhost'的访问被拒绝(使用密码:NO) - LAMP #1045 - Access denied for user 'root'@'localhost' (using password: NO)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM