DXF
2023 年7 月 8 日 12:43
#1
【 使用环境 】生产环境
【 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****
是可以正常工作的。
在工具中
也是可以工作的
【复现路径】问题出现前后相关操作
【问题现象及影响】
【附件】
2 个赞
张雨齐
2023 年7 月 8 日 14:01
#3
用户名错误。
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 个赞
DXF
2023 年7 月 8 日 15:42
#4
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 个赞
张雨齐
2023 年7 月 8 日 15:50
#5
是啊,我也附上了样例,也给你附上了链接,就是使用文档,可以看看别人样例中的用法。
1 个赞
DXF
2023 年7 月 8 日 15:57
#6
感觉谢您的帮忙
目前我换成如下命令,还是报错。
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
张雨齐
2023 年7 月 8 日 16:11
#7
数据库集群名是fund嘛?
有obproxy的话,最好还是用obproxy的2883端口。官方没看到让直连observer。所有样例都是2883的obproxy
DXF
2023 年7 月 8 日 19:40
#8
感谢,您的帮忙! 是的, 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 个赞
DXF
2023 年7 月 8 日 20:04
#9
我重新加了一个用户 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
张雨齐
2023 年7 月 10 日 12:04
#10
我手里没有这个环境,你2881直连,去掉-c参数试试。
2883的obproxy是需要-c的。
渔舟唱晚
2023 年7 月 10 日 14:31
#11
-u 用户名 -t 租户名 -c 集群名 -p 用户密码 -D 数据库名