views:

101

answers:

3

Hai guys,

I use the following connection string

<add name="connectionString" connectionString="server=localhost;user id=root; password=; database=lms; pooling=false;" providerName="MySql.Data.MySqlClient"/>

It gives me the error There is no 'lms'@'%' registered.

My database server is localhost and the user account doesn't have a password..

A: 

F0r MySql, should be something like:

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword
o.k.w
It didnt work for me
bala3569
same error There is no 'lms'@'%' registered
bala3569
A: 

Shouldn't it be something like:

<add name="ConnString" connectionString="Database=lmz;Data Source=localhost;User Id=root;Password=;CHARSET=utf8;" providerName="MySql.Data.MySqlClient"/>

Also check that the user has permissions to the database.

thephpdeveloper
A: 

Here's a working connection string for MySql:

server=localhost;user id=root;password=xxx;database=xxx;pooling=false

Can you connect from the command line (using "mysql")?

Is mysql by any chance bound to a different IP other than localhost (in my.ini)?

If you don't have a password, have you tried leaving off password=?

If that doesn't work, you may have to add a password....

RickNZ