locked
Connecting to MySQL from asp.net RRS feed

  • Question

  • User-726393064 posted

    Hi i have a site hosted by dataflame and i'm having trouble connecting to a MySQL database.

    I can set up a database on my PC and connect to it no problem but when i try using the same connection string on my hosted site i can't connect.

    both the following connection strings work on my pc but not on the hosted server

    <add name="ConnectionString" connectionString="Dsn=MySQLCon;uid=test;pwd=1234" providerName="System.Data.Odbc" />

    <add name="ConnectionString2" connectionString="server=localhost;User Id=test;password=1234;Persist Security Info=True;database=test"

    providerName="MySql.Data.MySqlClient"/>

    The first one gives the error keyword not supported 'Dsn'

    and the second one gives the error login failed for user 'test'

     

    what am i doing wrong?

    Thanks

    Mick

    Thursday, September 22, 2011 5:36 AM

All replies