Installing Orchard 1.9.1 default setup doesn't work under MySQL

Topics: Installing Orchard
Aug 17, 2015 at 3:26 PM
When installing the default Orchard 1.9.1 ZIP version with MySQL I get errors like these:

2015-08-17 10:19:26,733 [8] Orchard.Data.Migration.DataMigrationManager - Default - Error while running migration version 0 for Orchard.Autoroute.
http://orchard/ System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> MySql.Data.MySqlClient.MySqlException: BLOB/TEXT column 'DisplayAlias' used in key specification without a key length
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.RunPendingStatements() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 335
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.Visit(AlterTableCommand command) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 147
at Orchard.Data.Migration.Schema.SchemaBuilder.AlterTable(String name, Action`1 table) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Schema\SchemaBuilder.cs:line 50
at Orchard.Autoroute.Migrations.Create()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Orchard.Data.Migration.DataMigrationManager.Update(String feature) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\DataMigrationManager.cs:line 118

I also try to upgrade Orchard 1.7.2 to 1.9.1 but I get the same errors. This has something to do with the keys of the tables in MySQL, but I can't get it fixed.
Dec 17, 2015 at 7:30 AM
I got the same errors. I downloaded orchard 1.9.1 zip, and followed the steps(http://docs.orchardproject.net/Documentation/Manually-installing-Orchard-zip-file) , I used MySQL community edition 5.7.10, connection string is Data Source=localhost;Database=mydb;User Id=root;Password=123456 . After the setup page, I got 404 errors, and the log looked like this:
2015-12-17 13:50:33,000 [26] Orchard.Data.Migration.DataMigrationManager - Default - Error while running migration version 0 for Orchard.Autoroute.
http://localhost:8080/ System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> MySql.Data.MySqlClient.MySqlException: BLOB/TEXT column 'DisplayAlias' used in key specification without a key length
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int32& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery()
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.RunPendingStatements() in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 337
at Orchard.Data.Migration.Interpreters.DefaultDataMigrationInterpreter.Visit(AlterTableCommand command) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Interpreters\DefaultDataMigrationInterpreter.cs:line 144
at Orchard.Data.Migration.Schema.SchemaBuilder.AlterTable(String name, Action`1 table) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\Schema\SchemaBuilder.cs:line 51
at Orchard.Autoroute.Migrations.Create()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Orchard.Data.Migration.DataMigrationManager.Update(String feature) in z:\Builds\work\9f6cd39ff0f68f41\src\Orchard\Data\Migration\DataMigrationManager.cs:line 115
then I deleted App_Data and started over and used SQL Server, then everything is OK.