change webconfig mysql+ Connection. NET

Asked

Viewed 39 times

0

I have this site using Entity framework running normally in mysql localhost database, now I want to put on a server, I have tried to change several times the conneciton string, but it gives two errors that I will list below, I imagine that these errors have to do with the password, since in localhost there is no password, I tried to put the password with "password='password'" and "pwd='password'"

MISTAKES

Mysqlexception: Access denied for user 'meuusario'@'ipdobanco' (using password: NO)

Mysqlexception: Authentication to host 'den1.mysql1.gear.host' for user 'meuusario' using method 'mysql_native_password' failed with message: Access denied for user 'meuusario'@'ipdobanco' (using password: NO)

Current connection

<add name="kiccConnectionString" connectionString="server=localhost;user id=root;persistsecurityinfo=False;database=kicc" providerName="MySql.Data.MySqlClient" />

<add name="kiccEntities" connectionString="metadata=res://*/ModelProduto.csdl|res://*/ModelProduto.ssdl|res://*/ModelProduto.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;database=kicc&quot;" providerName="System.Data.EntityClient" />

<add name="kiccEntitiesBanco" connectionString="metadata=res://*/ModelProduto.csdl|res://*/ModelProduto.ssdl|res://*/ModelProduto.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;persistsecurityinfo=False;database=kicc&quot;" providerName="System.Data.EntityClient" />

    <add name="kiccEntitiesProjeto" connectionString="metadata=res://*/ModelBanco.csdl|res://*/ModelBanco.ssdl|res://*/ModelBanco.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=localhost;user id=root;database=kicc&quot;" providerName="System.Data.EntityClient" />
  • the first is the one that works, right ? what are the 3 others ?

  • I believe it’s from the Entity framework.

1 answer

1

Assuming that user’s password is correct, the error message:

Mysqlexception: Access denied for user 'meuusario'@'ipdobanco' (using password: NO)

This may mean that the user is not allowed to connect to the localhost server'.

This link can help you. link
If you do not know how to give permission have this link too. link

  • i will read these two links, but just to let you know I want to leave this bank on a server, not on localhost, using a free bank of this site https://my.gearhost.com/Databases/Details/coppula the bank is so there is the print on this link: http://prntscr.com/qxmqk3

Browser other questions tagged

You are not signed in. Login or sign up in order to post.