1

Hi I am developing and application in which I need to connect to MySQL database on remote server using IP address.

I have used below connection string:

<connectionStrings>
<add name="con" connectionString="Server=***.***.***.***;Port=3306;Database=enview;Uid=myuser;Pwd=****" providerName="MySql.Data.MySqlClient"/>

When I try to open connection I am getting below error.

Authentication to host '***.***.***.***' for user 'myuser' using method 'mysql_native_password' failed with message: Access denied for user 'myuser'@'**my IP**' (using password: YES)
3
  • The server may not allow remote connections; assuming the credentials are in fact correct. Commented Nov 21, 2013 at 12:43
  • @Michael Perrenoud Server allowing remote connection. I tried with PHP it's working fine. Commented Nov 21, 2013 at 12:45
  • Does it require HTTPS? Commented Nov 21, 2013 at 12:45

2 Answers 2

2

Maybe sql-server does not allow connections from non-server ip address, or you are prohibited to connect to database with non-server ip address. Check your permissions. May be your permissions were granted to username@localhost not to username@*

Sign up to request clarification or add additional context in comments.

Comments

1

Your're not mentioned details about remote server. If you are using third party remote server containing MySQL database, please ensure that it support remote access. You can check it on MySQL workbench. Try to connect same database on MySQL workbench.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.