MySql 5.7 schema creation failed

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
7/1/2019 3:55:11 PM
Gravatar
Total Posts 4

MySql 5.7 schema creation failed

Welcome to mojoPortal Setup

Probing system...
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema needs to be created.
Running script mojoportal-core - 2.2.7.8 - 00:00:00.2187695
MySql.Data.MySqlClient.MySqlException (0x80004005): Invalid default value for 'DateCreated' em MySql.Data.MySqlClient.MySqlStream.ReadPacket() em MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) em MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) em MySql.Data.MySqlClient.MySqlDataReader.NextResult() em MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) em MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() em MySql.Data.MySqlClient.MySqlScript.Execute() em mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) em mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) - 00:00:00.4531663
Running script mojoportal-core - 2.2.1.5 - 00:00:00.4687615

An Error Occurred:Table 'db3446.mp_SchemaVersion' doesn't exist

Source:MySql.Data

Stack Traceem MySql.Data.MySqlClient.MySqlStream.ReadPacket() em MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) em MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) em MySql.Data.MySqlClient.MySqlDataReader.NextResult() em MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) em MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean externalConn) em MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters) em mojoPortal.Data.DBPortal.SchemaVersionGetSchemaVersion(Guid applicationId) em mojoPortal.Data.DBPortal.SchemaVersionExists(Guid applicationId) em mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) em mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) em mojoPortal.Web.UI.Pages.SetupHome.RunSetup() em mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) em System.Web.UI.Control.OnLoad(EventArgs e) em System.Web.UI.Control.LoadRecursive() em Syst

 

Some idea? Something  I need to set at web.config?

7/5/2019 10:28:17 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: MySql 5.7 schema creation failed

With whatever tool you have available to look at the db3446 database, make sure that the mojoPortal database user (as specified in the database connection string in web.config or user.config) has full read/write access to the database, and that the user can read the contents of the mp_SchemaVersion table.

3/3/2020 1:42:05 PM
Gravatar
Total Posts 4

Re: MySql 5.7 schema creation failed

My reaction on this post is late but maybe useful for others.
Today I installed MojoPortal for the first time with mySql database and experienced the same error except for another table mp_SiteSettingsExDef.

In this/my case it had something to do with the case sensitivity of the name of the table.
The table in the database was created with uppercase characters (not all) while the code tried to open a lowercase name table which caused an error 'table does not exist'.

The hosting environment did not let me force mysql to use lowercase table names.
But I found the 'wrong' name in a config file called:

\Setup\applications\mojoportal-core\SchemaUpgradeScripts\mysql\2.6.0.4.config

It was spelled lowercase there.
After change it worked fine.



 

3/3/2020 3:01:11 PM
Gravatar
Total Posts 2254

Re: MySql 5.7 schema creation failed

Hi Ronald,

That file is fixed in our repository but not in our release files. We're testing a new release now and hope to have it published in next couple of weeks.

Thanks,
Joe

You must sign in to post in the forums. This thread is closed to new posts.