如何在 Orchard CMS 1.3.10 中使用 MySQL 数据库?
我正在尝试更改 Orchard.Setup 模块,以便我可以使用 MySQL 作为数据集安装 Orchard CMS 1.3.10。
我来得太久了,以至于我在 GUI 中获取 MySQL 进行设置,当我按下设置按钮时,我从果园收到此错误消息:
The value 'MySql' is not valid for DatabaseOptions.
但我找不到如何将 MySql 添加为 DatabaseOptions,还有其他人让它与 MySQL 一起使用吗?
MySQL 的旧模块与最新版本的 Orchard CMS 不兼容,这就是为什么我要自己制作它,如果我让它工作,我将开源它以供其他人使用。
I am trying to change the Orchard.Setup module so i can install Orchard CMS 1.3.10 with MySQL as datase.
I come so long that i getting MySQL in the GUI for setup and when i press setup button i getting this error message from orchard:
The value 'MySql' is not valid for DatabaseOptions.
But i can not find how i adding MySql as DatabaseOptions, do anyone else get it to work with MySQL?
The old module for MySQL is not compatible wtih the latest version of Orchard CMS thats why it ring to make it by my own, if i get it to work i going to release it open source for others to use.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您所讨论的错误是因为 DatabaseOptions 属性是布尔值。您需要更改该属性以接受字符串值。设置控制器中有几个地方需要更改该属性的使用方式...
但是,最重要的部分是实现 DataServicesProvider。我将我的添加到核心中,但我认为您可以将其作为一项功能放入设置模块中。我的看起来像这样...
哦,不要忘记您需要引用 MySql.Data。它以 NuGet 包的形式提供。
The error you're talking about is because the DatabaseOptions property is a boolean. You'll need to change that property to accept string values. There are a few places in the Setup Controller that you'll need to change how that property is used...
However, the most important part is to implement a DataServicesProvider. I added mine to core, but I think you could just put it in the Setup Module as a feature. Mine looks like this...
Oh, and don't forget you'll need to reference MySql.Data. It's available as a NuGet package.