-
Notifications
You must be signed in to change notification settings - Fork 2
Grassroots + MySQL
JasonOffutt edited this page Jan 6, 2012
·
12 revisions
In order to get Grassroots working with a MySQL database you'll need to do the following steps:
- Download and install MySQL 5.1 or greater.
- Run the database create and seed scripts found under
setup/scripts/MySQL. - Run the Stored Procedure create scripts found in
setup/StoredProcedures/MySQL. - Ensure your Grassroots source is referencing the MySQL .NET provider, MySQL.Data.dll, MySQL.Data.Entities and
MySQL.Webshould appear in thebinfolder. This enables Entity Framework to talk to MySQL. - Uncomment the MySQL connection string in the Grassroots
web.configfile. Make sure to edit it with the appropriate username and password for your MySQL server account. Note: Make sure your database name is all lower case and update with the appropriate server/database name and credentials.
<add name="GrassrootsContext" connectionString="Server=localhost; Database=grassroots; Uid=grassrootsuser; Pwd=secret;" providerName="MySql.Data.MySqlClient" />- Uncomment the
system.dataconfig section inweb.config.
<system.data>
<DbProviderFactories>
<clear />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
</DbProviderFactories>
</system.data>- Uncomment the MySQL Elmah
errorLogconfiguration setting in the elmah configuration section inweb.config.
<errorLog type="Elmah.MySqlErrorLog, Elmah" connectionStringName="GrassrootsContext" />