./obdumper -h192.168.9.115 -P2881 -u ‘root@dscom_tenant#demo’ -p ‘***’ --sql -t dscom_tenant -f /var/backup/address --all --skip-check-dir
总是报用户名密码错误
连接信息中,用户名格式和端口需要对应,2881代表直连数据库不通过代理obproxy,则-u写为root@dscom_tenant
就是没有通过代理的
./obdumper -h127.0.0.1 -P 2881 -u root@dscom_tenant -p “***” --sql -t dscom_tenant -f /var/backup/address --all --skip-check-dir
2025-07-29 16:57:41 [INFO] Parsed args:
[–sql] true
[–file-path] /var/backup/address
[–host] 127.0.0.1
[–port] 2881
[–user] root@dscom_tenant
[–tenant] dscom_tenant
[–password] ******
[–sys-user] root
[–all] true
[–skip-check-dir] true
2025-07-29 16:57:41 [INFO] Load jdbc driver class: “com.oceanbase.jdbc.Driver” finished
2025-07-29 16:57:41 [ERROR] create connection SQLException, url: jdbc:oceanbase://127.0.0.1:2881/root@dscom_tenant?characterEncoding=utf8&socketTimeout=1800000&connectTimeout=180000&usePipelineAuth=false&verifyServerCertificate=false&log=true&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&useLocalSessionState=true&useCompression=true&noDatetimeStringSync=true&zeroDateTimeBehavior=convertToNull&emulateUnsupportedPstmts=true&useServerPrepStmts=true&log=true, errorCode 1045, state 42000 java.sql.SQLSyntaxErrorException: Could not connect to 127.0.0.1:2881 : (conn=3221527983) Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: YES)
这样还是报错呢
目前报错,是密码不正常,黑屏连接下数据库确认下密码无误,再往下走
实际navicat连接是正常的
控制台直接输入也是正常的
obclient -P2881 -uroot@dscom_tenant -p****
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221547656
Server version: OceanBase_CE 4.2.5.0 (r100000052024102022-e7c676806fda04726bbbcdfbf1758057bb465b59) (Built Oct 20 2024 23:08:29)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
obclient(root@dscom_tenant)[(none)]>
导出命令里的:-t dscom_tenant
去掉
./obdumper -h127.0.0.1 -P 2881 -u root@dscom_tenant -p ‘***’ --sql -f /var/backup/address --all --skip-check-dir
2025-07-29 17:07:09 [INFO] Parsed args:
[–sql] true
[–file-path] /var/backup/address
[–host] 127.0.0.1
[–port] 2881
[–user] root@dscom_tenant
[–password] ******
[–sys-user] root
[–all] true
[–skip-check-dir] true
2025-07-29 17:07:09 [INFO] Load jdbc driver class: “com.oceanbase.jdbc.Driver” finished
2025-07-29 17:07:09 [ERROR] create connection SQLException, url: jdbc:oceanbase://127.0.0.1:2881/root@dscom_tenant?characterEncoding=utf8&socketTimeout=1800000&connectTimeout=180000&usePipelineAuth=false&verifyServerCertificate=false&log=true&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&useLocalSessionState=true&useCompression=true&noDatetimeStringSync=true&zeroDateTimeBehavior=convertToNull&emulateUnsupportedPstmts=true&useServerPrepStmts=true&log=true, errorCode 1049, state 42000 java.sql.SQLSyntaxErrorException: Could not connect to 127.0.0.1:2881 : (conn=3221563972) Unknown database ‘root@dscom_tenant’
继续报同样错误
好的,感谢支持
ok
不用谢集群名