Question

I have MySQL Database that Contain data i want to view in KenticoCMS 7.0 since there is no support from Kentico to MySQL DataBase , i have change the Connection string inside Web.config file

from : SQL Server Connection String to : MySQL Connection String

and the result was kicking out to configuration Page

<add name="CMSConnectionString" connectionString="Persist Security Info=False;database=SaDb;server=.\SQLExpress;user id=sa;password=P@ssw0rd;Current Language=English;Connection Timeout=240;" />

to reconfigure Database Again like first time i install Kentico

<add name="MySQLConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;Database=test;Uid=root;Pwd=root;" />

is there is any idea about view(just view) mySql data without convert it to SQL Server DB or making Web service to do this process?

Était-ce utile?

La solution

You can't change the main connection string of Kentico database. It results in new database installation as you described. In your situation you will have to develop a custom code to connect to MySql database. Creating a custom webpart may be a good way. Basically what you need to do:

  1. Create a custom webpart - how to do it.
  2. Install MySql drivers - copying assemblies from MySql connector-net into your website bin should be enough. Package can be downloaded here.
  3. Connect to MySql database - tutorial here.
  4. Retrieve and display data in a way you want.
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top