暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

GBase 8a数据库加载报错 mix use file protocol

JianGuo.Z 2022-05-09
1518

GBase 8a数据库集群通过LOAD加载方式入库,需要指定ftp,sftp,hadoop http等数据源,多个数据源之间用逗号分割。如果其写法格式错误,有可能出现这个mix use file protocol的报错。如下是一个密码里包含逗号的情况。

先看现象

gbase> load data infile 'ftp://a:b,c@127.0.0.1/*' into table testdb.tload;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: mix use file protocol
gbase>
gbase> load data infile 'ftp://a:b%2Cc@127.0.0.1/*' into table testdb.tload;
ERROR 1733 (HY000): (GBA-01EX-700) Gbase general error: Expanding wildcard operation failed with error - Couldn't connect to server uri : ftp://a:***@127.0.0.1/%2a.

原因

密码里有逗号,而逗号是2个数据源文件的分隔符。

解决方案

将特殊字符,转义。具体规则看SQL参考手册。 比如

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论