obdumper导出失败

执行导出命令如下:
./obdumper -h 192.168.0.51 -P 2881 -u datagather_user -t test -c xyhtest -p 5xUNOKym9rDq!@# -D datagather_db --sql --all -f /opt/obdumper
报错:
-bash: !@#: event not found

对特殊字符进行转义,执行导出命令如下:
./obdumper -h 192.168.0.51 -P 2881 -u datagather_user -t test -c xyhtest -p 5xUNOKym9rDq!@# -D datagather_db --sql --all -f /opt/obdumper
报错:
[ERROR] create connection SQLException, url: jdbc:mysql://192.168.0.51:2881/datagather_db?useUnicode=true&characterEncoding=utf8&socketTimeout=1800000&connectTimeout=180000&usePipelineAuth=false&verifyServerCertificate=false&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&useLocalSessionState=true&useCompression=true&noDatetimeStringSync=true&zeroDateTimeBehavior=convertToNull&emulateUnsupportedPstmts=true&useServerPrepStmts=true, errorCode 1045, state 42000 java.sql.SQLSyntaxErrorException: Could not connect to address=(host=192.168.0.51)(port=2881)(type=master) : (conn=-1073240441) Access denied for user ‘datagather_user’@‘xxx.xxx.xxx.xxx’ (using password: YES)

特殊符号,与shell命令冲突,可以尝试加单引号?

./obdumper -h 192.168.0.51 -P 2881 -u datagather_user -t test -c xyhtest -p ‘5xUNOKym9rDq!@#’ -D datagather_db --sql --all -f /opt/obdumper

./obdumper -h 192.168.0.51 -P 2881 -u datagather_user -t test -c xyhtest -p ‘5xUNOKym9rDq!@#’ -D datagather_db --sql --all -f /opt/obdumper

报错
[ERROR] create connection SQLException, url: jdbc:mysql://192.168.0.51:2881/datagather_db?useUnicode=true&characterEncoding=utf8&socketTimeout=1800000&connectTimeout=180000&usePipelineAuth=false&verifyServerCertificate=false&useSSL=false&allowMultiQueries=true&rewriteBatchedStatements=true&useLocalSessionState=true&useCompression=true&noDatetimeStringSync=true&zeroDateTimeBehavior=convertToNull&emulateUnsupportedPstmts=true&useServerPrepStmts=true, errorCode 1045, state 42000 java.sql.SQLSyntaxErrorException: Could not connect to address=(host=192.168.0.51)(port=2881)(type=master) : (conn=-1073243325) Access denied for user ‘datagather_user’@‘xxx.xxx.xxx.xxx’ (using password: YES)

-c xyhtest 去掉或者换成 -P 2883 试下

-c xyhtest去掉,密码加单引号,解决

上述异常信息说明;数据库拒绝 datagather_user 用户的访问。请检查 IP 端口,用户,租户,集群等相关信息是否正确。OceanBase部署架构不同,访问方式也有差别,例如:直连OBServer物理节点,连接OBProxy代理节点。不同的连接方式,命令行选项使用也不同。另外 obloader 强烈建议使用 CSV 格式导出数据。注意区分SQL格式与DDL的区别:SQL格式是指数据按照INSERT INTO导出的DML语句,而DDL语句是指对象的定义语句。