Apache Doris 中文技术论坛
Questions Tags Users Badges

【已解决】Go程序 使用mysql包 连接Doris报错

Asked Apr 11, 2024 Modified Apr 12, 2024
Viewed 82
2.1

go语言 代码中通过调database/sql包和mysql的驱动github.com/go-sql-driver/mysql,去访问Doris失败
19bcc21128e382db5a68186cc9f68bb9.png
------image.png

----image.png
但我连接mysql是正常的,请问是二者的协议是不兼容吗。

edited Apr 12, 2024
松鼠找不到松果13
asked Apr 11, 2024
2 Answers

解决方法:
go.mod中
github.com/go-sql-driver/mysql v1.8.1
换成
github.com/go-sql-driver/mysql v1.4.1

edited Jan 1, 1970
松鼠找不到松果13
answered Apr 11, 2024

二者的协议是兼容的
你可以参考下这个文档
https://developer.aliyun.com/article/1344625
可用的话,辛苦点个采纳

edited Jan 1, 1970
徐振超@SelectDB7471
answered Apr 11, 2024
Related Questions
doris的be奔溃,版本2.1.7
1 answers
Doris开启了2阶段提交,且事务已经被清理了,如何判断最近一次的ckp对应的事务是否正常提交了
报错: Failed to get scan range, no queryable replica found in tablet
1 answers
求助!x2doris同步经常中断
1 answers
Apache Doris内存不够,为什么不像spark一样排队处理,Tablet排队一个个处理,而是报错,请问这个解释对吗
1 answers
为什么相同的内存,执行一样的任务,spark可以执行完,但是doris却报内存不足错误,doris已经调整了单个任务可以使用集权资源的80%
1 answers

Terms of service Privacy policy

Powered by Answer - the open-source software that powers Q&A communities.
Made with love © 2025 Apache Doris 中文技术论坛.