请高人帮忙看看 obdumper 密码错误,但我用JAVA和工具都是对。 Access denied for user 'root'@'xxx.xxx.xxx.xxx'

【 使用环境 】生产环境
【 OB or 其他组件 】ob obdumper
【 使用版本 】ob4.1 CE ob-loader-dumper-4.2.1
【问题描述】请高人帮忙看看 obdumper 密码错误,但我用JAVA和工具都是对。
Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’

obdumper.bat -h 10.0.10.103 -P 2881 -u root@fund -p Abcd123**** --sys-user root@sys --sys-password Abcd123**** -c fund -t fund -D kline --orc --table ‘*’ --thread 10 -f kline_bak

在JAVA中
jdbcUrl=jdbc:mysql://10.0.10.103:2881/kline?useUnicode=true&characterEncoding=utf8&useSSL=false
username=root@fund
password=Abcd123****
是可以正常工作的。

在工具中
image
也是可以工作的

【复现路径】问题出现前后相关操作
【问题现象及影响】

【附件】

2 个赞

用户名错误。
obloader/obdumper这些工具用户名就是普通用户名,不用带租户名。

-u用户名
-t租户名
-c集群名

[admin@localhost]> ./obdumper -h 10.0.0.0 -P 2883 -u test -p ****** --sys-user **u*** --sys-password ****** -c cluster_a -t mysql -D USERA --csv --table '*' -f /output 

https://www.oceanbase.com/docs/enterprise-oceanbase-dumper-loader-cn-0000000002362701

https://www.oceanbase.com/docs/enterprise-oceanbase-dumper-loader-cn-10000000001142225

1 个赞

jdbcUrl=jdbc:mysql://10.0.10.103:2881/kline?useUnicode=true&characterEncoding=utf8&useSSL=false
username=root@fund
password=Abcd123****

我这种情况下,
-u用户名
-t租户名

-u root -t fund

是这样吗?

2 个赞

是啊,我也附上了样例,也给你附上了链接,就是使用文档,可以看看别人样例中的用法。

1 个赞

感觉谢您的帮忙
目前我换成如下命令,还是报错。

obdumper.bat -h 10.0.10.103 -P 2881 -u root -p Abcd123**** -c fund -t fund -D kline --orc --table ‘*’ --thread 10 -f kline_bak

数据库集群名是fund嘛?
有obproxy的话,最好还是用obproxy的2883端口。官方没看到让直连observer。所有样例都是2883的obproxy

感谢,您的帮忙! 是的, fund 集群名, 也是租户名
我把端口改为2883, 还是不行。 如下图:

D:\Software\ob-loader-dumper-4.2.1-RELEASE\bin\windows>obdumper.bat -h 10.0.10.103 -P 2883 -u root -p Abcd123**** -c fund -t fund -D kline --orc --table ‘*’ --thread 10 -f kline_bak

1 个赞

我重新加了一个用户 test 也是不行!
obdumper.bat -h 172.16.11.103 -P 2881 -u test -p Abcd123**** -c fund -t fund -D kline --orc --table ‘*’ --thread 10 -f kline_bak

我手里没有这个环境,你2881直连,去掉-c参数试试。
2883的obproxy是需要-c的。

image

-u 用户名 -t 租户名 -c 集群名 -p 用户密码 -D 数据库名