How to setup MySql as Default database in place of MSSql under latest version of mojo portal

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/1/2009 4:25:32 AM
Gravatar
Total Posts 17

How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Probing system...
File system permissions ok.
The system cannot connect to the MSSQL database. Please check your connection string.

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at mojoPortal.Data.SqlParameterHelper.ExecuteScalar() in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:line 157 at mojoPortal.Data.DBBannedIP.IsBanned(String ipAddress) in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\mojoPortal.Data.MSSQL\dbBannedIP.cs:line 122 at mojoPortal.Business.BannedIPAddress.IsBanned(String ipAddress) in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\mojoPortal.Business\BannedIPAddress.cs:line 176 at mojoPortal.Web.BannedIPBlockingHttpModule.IsBanned(String ip) in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\Web\Components\BannedIPBlockingHttpModule.cs:line 224 at mojoPortal.Web.BannedIPBlockingHttpModule.BeginRequest(Object sender, EventArgs e) in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\Web\Components\BannedIPBlockingHttpModule.cs:line 74 at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo) in D:\mojoportal-2-2-9-6-sourcecode\sourcecode\mojoportal\mojoPortal.Data.MSSQL\dbPortal.cs:line 349

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.

 

Hello Sir,

                 I have  downloaded latest version of mojo portal but when i am setting up that how can  i set  MySql as default database in place of

MS Sql .

 

 

4/1/2009 6:04:18 AM
Gravatar
Total Posts 18439

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

As it says in the documentation here http://www.mojoportal.com/mysqlsetup.aspx

You need todownload the mojoportal-x-x-x-x-mysqldatalayer.zip, extract it and then replace the the *Data.dll files in the /bin folder with the ones from the MySql data layer package. 

Hope it helps,

Joe

4/1/2009 6:29:50 AM
Gravatar
Total Posts 17

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Hello Joe,

                Thanks for ur reply.I have replaced the mysql.data.dll in bin folder and have make change in web.config connection string

like above :

        <add key="MySqlConnectionString" value="Data Source=192.168.1.208;Database=mojoportal;User ID=rajesh;Password=123456;Charset=utf8;"/>
 

 

But when i am running that application it says that only as mentioned by me previously . How to set in web config that it uses mysql database

by default and do every thing regarding setup

4/1/2009 6:34:28 AM
Gravatar
Total Posts 18439

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Use all the dlls from the MySql data layer, not just MySql.Data.dll

 

4/30/2009 8:48:49 AM
Gravatar
Total Posts 1

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Same problem here!

download mysql data layer... done

copy all dll in bin folder... done

modify MySql connectionstring... done

still have same error:

 

Probing system...
File system permissions ok.
The system cannot connect to the MSSQL database. Please check your connection string.

System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo) in C:\Sviluppo\mojoPortal\mojoPortal.Data.MSSQL\dbPortal.cs:line 349

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.

4/30/2009 9:34:57 AM
Gravatar
Total Posts 18439

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Ok, the instructions about copying the dlls is for using the "release" packages which are pre-compiled for deployment with no source code.

If you are using source code in visual studio you need to change some project referenes as described here: http://www.mojoportal.com/settingadatalayerreferenceinvisualstudio.aspx

Hope it helps,

Joe

3/22/2010 3:12:29 AM
Gravatar
Total Posts 4

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

Done the above and have used mojoportal-2-3-3-9-sqlazure-deploymentfiles.zip and the mysql data layer.

I assume this is the release version.  Still get the same error.

My connection string may not be correct but i was expecting the error to mention mysql instead of mssql

3/23/2010 6:56:41 AM
Gravatar
Total Posts 18439

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

 

Hi,

If the error says it cannot connect to MS SQL then it means clearly you have not replaced the dlls in the /bin folder with the MySql versions, so you may have copied files but not into the correct locations.

Actually if you used the SqlAzure version it would say it cannot connect to SqlAzure, so possibly you replaced the SqlAzure data dlls with the MS SQL dlls not MySql

Hope it helps,

Joe

5/20/2010 1:10:40 PM
Gravatar
Total Posts 1

Re: How to setup MySql as Default database in place of MSSql under latest version of mojo portal

I had the same problem, I followed the instruction,

 

download mysql data layer... done

copy all dll in bin folder... done

modify MySql connectionstring... done

 

I changed mysql databse info in Web.config and user.config : From this point I was getting the error.

I rename user.config to user.config.bac, Problem solved.

To resume, only update the Web.config to point to your mysql database and you should be ok.

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