New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for using unixsocket to connect to mysql #6031
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 |
用Unixsocket方式为内存拷贝理论上比TCP更高效
本人已测试,功能正常,望合并