Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

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.
9/5/2008 5:10:05 PM
Gravatar
Total Posts 16
Jesuite

Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Hi Joe,

I've grabb to day a brand new mojoportal from svn, fire up my connection string, my database. But I've run into some stange error, as this is not the first time I tried setup a mojoportal installation for development. Here the error :

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.4.8 - 00:00:00.3125000
MySql.Data.MySqlClient.MySqlException: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql.Data.MySqlClient.MySqlStream.OpenPacket() at MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) at MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() at MySql.Data.MySqlClient.MySqlDataReader.NextResult() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() at MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() at MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters) at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) in C:\svn\mojoportal\mojoPortal.Data.MySql\dbPortal.cs:line 728 at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) in C:\svn\mojoportal\mojoPortal.Data.MySql\dbPortal.cs:line 687 at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) in C:\svn\mojoportal\mojoPortal.Business\DatabaseHelper.cs:line 313 - 00:00:00.3593750
Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.

This is my configuration : XP SP2 + dotnetfx35, VS2005 (full) + SP1, MySQL essential 5.1, MySQL Connector 5.2
What am I doing wrong ? Any help will be appreciated.

Guillaume.

9/6/2008 8:04:33 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Hi Guillaume,

People have reported problems in the past using MySql 5.1. As far as I know that version is a release candidate not a final release version.

I think if you uninstall it and use MySql 5.0 you won't have this error.

Hope it helps,

Joe

9/6/2008 12:38:36 PM
Gravatar
Total Posts 16
Jesuite

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Hi Joe,

I confirme, mojoPortal runs well with MySQL 5.0. But as I've move some developements to MySQL 5.1 with the new Connector 5.2, I thought mojoPortal too will run with the 5.1 release. Ok, ok, I was wrong ; falling back to MySQL 5.0 !

Thank you.

Guillaume.

2/23/2009 8:13:17 AM
b
Gravatar
Total Posts 13

Re: Can't create table 'xxxxx.mp_sites' (errno: 150) at MySql

Now that MySQL 5.1 is the stable production version and 5.2 is the .net connector, this error occurs with the current (2/23/08) download of mojoportal. 

2.2.7.8 - 00:00:00.3750000 - MySql.Data.MySqlClient.MySqlException: Can't create table 'xxxx.mp_sites' (errno: 150)

So, how does one get around this, since I'm using the recommended production versions of each?  Please don't tell me to go backward.  Are there manual scripts that I can run to get the tables established?  Is there a change to source that is needed and recompiled to make it work?

Please point me in the right direction and I'll share my experience when done.

Steps to take:

1. Check the version of the mysql script from Setup\applications\mojoportal-core\SchemaInstallScripts\mysql\ -- navigate to
\Setup\applications\mojoportal-core\SchemaUpgradeScripts\mysql  and delete all scripts upto and including the same version found in the schemainstallscripts subdirectory -- in my case, that meant all scripts up to and including 2.2.7.8.config.
2. Copied the mysql script from Setup\applications\mojoportal-core\SchemaInstallScripts\mysql\2.2.7.8.config into the MYSQL Query Browser.  Had to execute on each line sequentially.  All query statements executed.
3. Followed Joe's advice, deleted update .config files through 2.2.7.8.config from the subdirectory \Setup\applications\mojoportal-core\SchemaUpgradeScripts\mysql -- re-entered http://xxxx/Setup/Default.aspx into browser.
Reached this statement:
Setup is complete, click the link below to go to the home page.
Database PlatformMySQL
Version2.2.8.6
StatusYour installation is up to date.
4. clicking on link opened up portal at http://xxxx/default.aspx

Done the above works. 

 

Error messages you might encounter if you don't delete the older script files:
File system permissions ok.
MySQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
0 site(s) found.
Running script mojoportal-core - 2.2.1.5 - 00:00:00.7812500
Running script mojoportal-core - 2.2.1.6 - 00:00:00.8750000
Running script mojoportal-core - 2.2.1.7 - 00:00:00.9687500
Running script mojoportal-core - 2.2.1.8 - 00:00:01.0781250
Running script mojoportal-core - 2.2.1.9 - 00:00:01.1718750
MySql.Data.MySqlClient.MySqlException: Duplicate column name 'FailedPwdAnswerAttemptCount' at MySql.Data.MySqlClient.MySqlStream.OpenPacket()

If you get errors similar to these, then go back and delete the scripts as instructed in step 1.

The following issues are un-resolved:

PS -- It is curious in this approach that the system is not aware of the version so that it can appropriately run the upgrades.  So, to avoid the mess I began with, deleting the scripts from the schemaupgradescripts directory up to the same version number that was in setup enabled the install script found using setup/default.aspx to operate as expected. My belief is that this deletion process shouldn't be required, since the script should be aware of what version it ran to begin with and would incrementally begin at the next number in sequence.

PPS - I did not have to do a manual insert of application ID information, since this process used the scripts as intended by mojoportal -- the scripts setup this table and the appropriate column information.

PPPS - still not sure why MySQL5.1 didn't work with the initial setup -- if I figure out more, I'll let this conversation know through a separate reply.

And, yes, I just update this post until it gets to the point that it has coherence -- that way this isn't a long list of disjointed information./
And no, I want to use the latest versions of MySQL -- I have other dbs that work just fine and use some of the newer features, so don't want to go backward.
And yes, I am listening, but it isn't a real-time connection that I have with this site or my email.  So there is a delay in reply.  Please be patient. 
Once done, I'll clean up this post so that it will make sense to anyone else following the same footsteps.

Post is now cleaned up.

 

2/23/2009 8:29:57 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Hi,

Sorry but MySql 5.1 is buggy, even Monty who just left Sun said so, see some links:

http://www.webhostingtalk.com/showthread.php?t=756551 

http://www.eweek.com/c/a/Database/MySQL-Founder-Monty-Widenius-Leaves-Sun-Microsystems-For-Real-This-Time/

FYI, in mojPortal we are already using MySql Connector 5.2.2

I see the newest connector is 5.2.5, I will download that today and include it in the next release, maybe that can solve it but if it doesn't I don't know anything else to do but recommend version 5.0 of MySql. I cannnot be held accountable for their bugs. 

If you think this is a bug in mojoPortal then please prove it by offering a solution. I do not think it is a bug, these install scripts have worked since the beginning across version of MySql going back to 3.x up through 4.x and 5.0.

Best,

Joe

2/23/2009 8:34:09 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

You may also want to make sure that your installation of MySql includes support for InnoDb storage engine which was the default for many years but then InnoDb was bought by Oracle and MySql started to use others and may be leaving it out or providing packages without it. Our tables require InnoDb.

Hope it helps,

Joe 

2/23/2009 8:56:55 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Dude, its kind of confusing when you keep updating your post instead of making new posts. 

You are off the tracks and need to start with a clean db, it should not run any scripts below 2.2.7.8, those are old upgrade scripts.

If you want to run them manually start with a clean db

first script is at /Setup/applications/mojoportal-core/SchemaInstallScripts/mysql/2.2.7.8

after that you run upgrade scripts from /Setup/applications/mojoportal-core/SchemaUpgradeScripts/mysql/

starting with version 2.2.7.9 and working your way up.

Then you need to manual insert into mp_SchemaVersion

ApplicationID = 077e4857-f583-488e-836e-34a4b04be855

ApplicationName = mojoportal-core, version 2.2.8.6

Then you will need to do the same process for othe applications under /Setup/applications

For those the application guid is not as important, you could generate a guid or use the one from /Setup/Application/[appname]/FeatureDefinitions/[configfile], look for featureGuid

Much easier to just use MySql 5.0 but those are the steps.

Hope it helps,

Joe

2/23/2009 9:07:32 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

Dude you are off in the weeds not listening to me, I'm done trying to help you. I'm too busy to try and help people who don't listen.

2/23/2009 9:13:52 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

You keep updating that same post and ignoring what I have posted.

Thats not how a conversation is supposed to work. 

2/23/2009 9:58:25 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

 If you keep running scripts lower than 2.2.7.8 you are not listening close enough. I told you the correct steps for manual running of the scripts.

I told you the 2.2.7.8 script is in the SchemaInstallScripts folder but you must be trying to run the 2.2.7.8 upgrade script from the SchemUpgradeScripts.

2/23/2009 11:11:42 AM
Gravatar
Total Posts 18439

Re: Can't create table 'evalorhaewe.mp_sites' (errno: 150) at MySql

The following issues are un-resolved:

It is curious in this approach that the system is not aware of the version so that it can appropriately run the upgrades.  So, to avoid the mess I began with, deleting the scripts from the schemaupgradescripts directory up to the same version number that was in setup enabled the install script found using setup/default.aspx to operate as expected. My belief is that this deletion process shouldn't be required, since the script should be aware of what version it ran to begin with and would incrementally begin at the next number in sequence.

 If the first script had succeeded the .NET code would have inserted the version information into the mp_SchemaVersion table and then it would have known the next script to run is higher than 2.2.7.8

if the mp_Sites table exists it assumes an upgrade instead of a clean install. So the first script created the mp_Sites table but then failed, so when setup ran next it detected the existence of the mp_Sites table and decided it needed an upgrade not a new install. Since the mp_SchemaVersion table did not have the version info (or perhaps was failed to create that table) then it tried to run upgrade scripts and it ran old ones because they exist and as far as it knew were newer than the current version since version was not known from the db.

I hope the 5.2.5 version of MySql connector will solve this. The fact that scripts run from query browser shows there is no error in the scripts.

Best,

Joe

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