DB Permission 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.
4/14/2009 4:21:13 AM
Gravatar
Total Posts 41

DB Permission mysql

Hello,

I'm trying to install mojoportal on a hosted server. When running setup it complains that the user has not permission to change the schema for the db. I talked with the support and they are wondering which permissions I need.

I ran the setup db script manually from the db administrator UI without any problem. The installation now stops on the "coredbschema needs to upgrade".

4/14/2009 7:15:41 AM
Gravatar
Total Posts 18439

Re: DB Permission mysql

The user needs all permissions to create db objects. And permissions are specific by which host the user is connected from unless the permissions are granted for username@any

You did not say what steps you took to do a "manual" installation, so I'm not convinced it was done correctly. Also if you create the tables with a different user than the one in your connection string then there may not be correct permissions. Currently your system is in an unknown state and that makes it very difficult to help.

I recommend clean all objects out fo the db and resolve the connection string permission problem then use the automated setup.

If you are using MySql 5.1, I'm sorry but its buggy and was released with bugs, 5.0 is the version I recommend for production dbs. I have never been able to install mojoPortal on MySql 5.1.

Hope it helps,

Joe

4/15/2009 3:09:10 PM
Gravatar
Total Posts 41

Re: DB Permission mysql

Thanks for your reply Joe. The support says that the db has the following permissions:

Select_priv = Y
Insert_priv = Y
Update_priv = Y
Delete_priv = Y
Create_priv = Y
Drop_priv = Y
Grant_priv = N
References_priv
Index_priv = Y
Alter_priv = Y
Create_tmp_table_priv = N
Lock_tables_priv = N

They are using version 4.0.26 of mysql.

The manual steps i took to create the database was just to run the db script in the core folder to see if I had the permissions using the GUI for the db. It did complain on default charset=utf8 so I had to remove them before I could run the script.

I have previously installed an older version of mojoportal on this host but that was before the automated db installer was implemented.

Any suggestions where to go from here?

4/16/2009 4:48:14 AM
Gravatar
Total Posts 18439

Re: DB Permission mysql

Hi,

Ok, if there is an old installation there may be extra files that shouldn't be there for a new install. Look in /Setup/application/mojoportal-core/SchemaInstallScripts/mysql folder

There should only be 1 script file there. If there is more than 1 then remove all except 2.2.7.8.config

Then empty out the db and start again.

The permissions look mostly ok, I'm not sure about that Lock_tables_priv, it "may" need that to alter existing tables, I'm not sure if MySql needs to lock a table in order to alter it. 

Hope it helps,

Joe

4/21/2009 7:37:59 AM
Gravatar
Total Posts 41

Re: DB Permission mysql

Hello Joe,

The problem still remains. I cannot run setup. The host has given me the Lock_tables_priv permission. I did a clean install (deleted all tables).

This is the currentlog.config after I try to run Setup/Default.aspx, please have a look because I doubt that this can be caused by a db permission. Maybe it's caused by the SQL syntax error (shouldn't it be a ' at the end of the string?):

2009-04-21 14:31:09,656 ERROR mojoPortal.Web.BannedIPBlockingHttpModule - handled exception:
MySql.Data.MySqlClient.MySqlException: Table 'wse48148_1.mp_BannedIPAddresses' doesn't exist
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.ExecuteScalar()
at MySql.Data.MySqlClient.MySqlHelper.ExecuteScalar(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteScalar(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBBannedIP.IsBanned(String ipAddress)
at mojoPortal.Business.BannedIPAddress.IsBanned(String ipAddress)
at mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e)
2009-04-21 14:31:09,671 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'wse48148_1.mp_SiteHosts' doesn't exist
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.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBSiteSettings.GetSite(String hostName)
at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName)
at mojoPortal.Business.SiteSettings..ctor(String hostName)
at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings()
2009-04-21 14:31:09,671 ERROR mojoPortal.Web.UrlRewriter - System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.UrlRewriter.GetRedirectUrl(String targetUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
2009-04-21 14:31:09,687 ERROR mojoPortal.Web.UrlRewriter - MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT SiteID From mp_SiteHosts WHERE HostName = 'pippi.helldin
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.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBFriendlyUrl.GetByUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl.GetFriendlyUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl..ctor(String hostName, String friendlyUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
2009-04-21 14:31:09,718 ERROR mojoPortal.Data.DBPortal - dbPortal.RunScript failed
MySql.Data.MySqlClient.MySqlException: Query was empty
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.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo)
 

4/21/2009 8:17:00 AM
Gravatar
Total Posts 18439

Re: DB Permission mysql

I do not understand what is happening on your installation, it works fine for me, I never encounter this error.

The only thing I can suggest is to comment out the BannedIPBlockingHttpModule in Web.config, look for this and comment it out by wrapping it inside comments
<!--  -->

<add name="BannedIPBlockingHttpModule" type="mojoPortal.Web.BannedIPBlockingHttpModule, mojoPortal.Web" /> 

Hope it helps,

Joe

 

4/21/2009 2:18:07 PM
Gravatar
Total Posts 41

Re: DB Permission mysql

ok, I tried to run setup again with BannedIPBlockingHttpModule commented out, problem still remains.

Here is the error log:

2009-04-21 21:12:59,673 INFO mojoPortal.Web.Global - Applikation startade.
2009-04-21 21:13:00,736 ERROR mojoPortal.Web.WebTaskManager - MySql.Data.MySqlClient.MySqlException: Table 'wse48148_1.mp_TaskQueue' doesn't exist
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.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBTaskQueue.GetUnfinished()
at mojoPortal.Business.TaskQueue.GetUnfinished()
at mojoPortal.Web.WebTaskManager.StartOrResumeTasks(Boolean appWasRestarted)
2009-04-21 21:13:01,267 ERROR mojoPortal.Business.WebHelpers.CacheHelper - Error trying to obtain siteSettings
MySql.Data.MySqlClient.MySqlException: Table 'wse48148_1.mp_SiteHosts' doesn't exist
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.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBSiteSettings.GetSite(String hostName)
at mojoPortal.Business.SiteSettings.GetSiteSettings(String hostName)
at mojoPortal.Business.SiteSettings..ctor(String hostName)
at mojoPortal.Business.WebHelpers.CacheHelper.LoadSiteSettings()
2009-04-21 21:13:01,283 ERROR mojoPortal.Web.UrlRewriter - System.NullReferenceException: Object reference not set to an instance of an object.
at mojoPortal.Web.UrlRewriter.GetRedirectUrl(String targetUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
2009-04-21 21:13:01,298 ERROR mojoPortal.Web.UrlRewriter - MySql.Data.MySqlClient.MySqlException: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT SiteID From mp_SiteHosts WHERE HostName = 'pippi.helldin
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.MySqlHelper.ExecuteReader(MySqlConnection connection, MySqlTransaction transaction, String commandText, MySqlParameter[] commandParameters, Boolean ExternalConn)
at MySql.Data.MySqlClient.MySqlHelper.ExecuteReader(String connectionString, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBFriendlyUrl.GetByUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl.GetFriendlyUrl(String hostName, String friendlyUrl)
at mojoPortal.Business.FriendlyUrl..ctor(String hostName, String friendlyUrl)
at mojoPortal.Web.UrlRewriter.RewriteUrl(HttpApplication app)
at mojoPortal.Web.UrlRewriter.UrlRewriter_BeginRequest(Object sender, EventArgs e)
2009-04-21 21:13:02,751 ERROR mojoPortal.Data.DBPortal - dbPortal.RunScript failed
MySql.Data.MySqlClient.MySqlException: Query was empty
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.ExecuteNonQuery()
at MySql.Data.MySqlClient.MySqlHelper.ExecuteNonQuery(MySqlConnection connection, String commandText, MySqlParameter[] commandParameters)
at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo)
 

4/22/2009 8:18:15 AM
Gravatar
Total Posts 18439

Re: DB Permission mysql

I would try uploading the /Setup folder again. I think possibly some script files are corrupted or empty because of this part in your error log:

mojoPortal.Data.DBPortal - dbPortal.RunScript failed MySql.Data.MySqlClient.MySqlException: Query was empty 

Possibly there were ftp tranfer errors and some files got corrupted.

Hope it helps,

Joe

4/25/2009 12:55:21 AM
Gravatar
Total Posts 41

Re: DB Permission mysql

Hi Joe,

Uploaded all the files again, still no success to run setup.

Don't you think that this can be caused by the MySql.Data.MySqlClient.MySqlException? It looks like a cutoff Select query to me.

/Emil

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