The error you are talking about is because the DatabaseOptions property is a boolean. You will need to change this property to accept string values. There are several places in the installation controller that you need to change how this property is used ...
However, the most important part is the implementation of DataServicesProvider. I added my kernel, but I think you could just put it in the installation module as a function. Mine looks like this ...
namespace Orchard.Data.Providers { public class MySqlDataServiceProvider : AbstractDataServicesProvider { private readonly string _connectionString; public MySqlDataServiceProvider(string dataFolder, string connectionString) { _connectionString = connectionString; } public static string ProviderName { get { return "MySql"; } } public override IPersistenceConfigurer GetPersistenceConfigurer(bool createDatabase) { var persistence = MySQLConfiguration.Standard; if (string.IsNullOrEmpty(_connectionString)) { throw new ArgumentException("The connection string is empty"); } persistence = persistence.ConnectionString(_connectionString); return persistence; } } }
Oh, and donβt forget that you will need to reference MySql.Data. It is available as a NuGet package.
source share