support for using unixsocket to connect to mysql#6031
support for using unixsocket to connect to mysql#6031xhofe merged 3 commits intoAlistGo:mainfrom Mars160:unix-mysql
Conversation
|
Thanks for opening this pull request! Please check out our contributing guidelines. |
This comment was marked as resolved.
This comment was marked as resolved.
|
Reopen |
|
Congrats on merging your first pull request! We here at behavior bot are proud of you! |
|
求地址格式,感谢分享 |
|
看了一下并没有采用我的配置方式,而是直接在配置文件中添加了DSN字段 之前是: 现在变成: 如果没有密码,dsn可以改成 如果需要更加灵活的配置方式,参考GORM的DSN字符串,也就是下面这个,可以自行调整
|
This comment was marked as resolved.
This comment was marked as resolved.
明白了,感谢大佬 。是这样的格式吧 请问数据库的用户名在哪里填写 |
|
@msycn 用户名密码等等你所需要的一切都在dsn里面 我的示例是不能直接用的,需要你自行替换一些内容 写成自己的东西就是 除去dsn,你的database配置里的其他内容没有问题 |
|
谢谢
谢谢 调试了一下默认是 "table_prefix": "x_", |
* support for unixsocket to connect to mysql * feat: customize dsn for mysql and pg --------- Co-authored-by: Andy Hsu <i@nn.ci>
* support for unixsocket to connect to mysql * feat: customize dsn for mysql and pg --------- Co-authored-by: Andy Hsu <i@nn.ci>
|
What should be the value if we don't want to use DSN in case of mysql |
|
@Nirzak Just leave the dsn field in the configuration file alone and fill in the other fields (host, port, etc.) as usual |
用Unixsocket方式为内存拷贝理论上比TCP更高效
本人已测试,功能正常,望合并