Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# bernie__n 9/30/2008 10:29 PM (edited 10/1/2008 1:07 AM)
Hi,

I'm trying to install the cms using a MySQL 4/5 database.
When running the install page and choosing the module installation (optional modules), I will get the following MySqlException:

Cuyahoga Installation
An error occured while installing additional modules:
System.Exception: An error occured while executing the following script: D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Web\Modules\Articles\Install\Database\mysql\install.sql ---> MySql.Data.MySqlClient.MySqlException: Fatal error encountered during command execution. ---> MySql.Data.MySqlClient.MySqlException: Parameter '@moduletypeid' must be defined. bei MySql.Data.MySqlClient.Statement.SerializeParameter(MySqlParameterCollection parameters, MySqlStream stream, String parmName) bei MySql.Data.MySqlClient.Statement.InternalBindParameters(String sql, MySqlParameterCollection parameters, MySqlStream stream) bei MySql.Data.MySqlClient.Statement.BindParameters() bei MySql.Data.MySqlClient.PreparableStatement.Execute() bei MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) --- Ende der internen Ausnahmestapelüberwachung --- bei MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) bei MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() bei Cuyahoga.Core.Util.DatabaseUtil.ExecuteSqlScript(String scriptFilePath) in D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Core\Util\DatabaseUtil.cs:Zeile 99. --- Ende der internen Ausnahmestapelüberwachung --- bei Cuyahoga.Core.Util.DatabaseUtil.ExecuteSqlScript(String scriptFilePath) in D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Core\Util\DatabaseUtil.cs:Zeile 111. bei Cuyahoga.Core.Service.DatabaseInstaller.Install() in D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Core\Service\DatabaseInstaller.cs:Zeile 121. bei Cuyahoga.Web.Install.Install.InstallOptionalModules() in D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Web\Install\Install.aspx.cs:Zeile 145. bei Cuyahoga.Web.Install.Install.btnInstallModules_Click(Object sender, EventArgs e) in D:\Develop\Websites_Live\Cuyahoga\Cuyahoga-1.5.2-src\Web\Install\Install.aspx.cs:Zeile 381.


Does somebody know how to resolve this problem?
I have tried this MySql 4 and 5 as well. When I run the install page connecting to an MSSQL 2005 database, everything works fine.

Thanx!
Bernie
# martijnb 10/1/2008 8:52 PM
I think I found something. From the MySQL 5.2.3 connector release notes (assuming you're using 5.2.3):
There is a new connection string option named 'Allow User Variables'. The default value is false.
With the default value, the provider doesn't expect to see any user variables in the SQL therefore
if it sees @_name_ in the SQL it will assume there should be a parameter with the same base name
and throw an exception if one is not there. If you intend to use user variables, you have two
options. First, continue to use ? for your parameters (not recommended) or
set Allow User Variables to true. With this set to true, the provider will not throw an exception
if a parameter appears to be missing.
# bernie__n 10/3/2008 7:12 PM
Hi Martijn,

yes, the new connection parameter 'allow user variables' did resolve the problem. The usage in the connectionString property is:
server=localhost;database=mydatabase;uid=***;pwd=***;allow user variables=true

Thanx a lot!
Bernie
# martijnb 10/4/2008 2:04 PM
Alright, glad that it worked. Probably, we'll run into this more often in the future when more people start using a new MySQL connector.