-2

I have a C# Application which would access a MySQL server on another computer. I am trying to do it via IP. Here is my Connection String :

result = "server =66.45.233.226; user id=testcampuscrm; password =Daph$5656; database=testcampuscrm; convert zero datetime=true; ";

getting error this

Access denied for user 'testcampuscrm'@'66.45.232.178' (using password: YES)

My code is anther hosting and mysql database anther hostig please help us. Thanks

Rai Vu
  • 1,595
  • 1
  • 20
  • 30
  • please provide code snippet you are using – Mihir Dave Mar 05 '18 at 12:00
  • 1
    You have to authorize your machine on the MySQL server. But it's off-topic. You should ask your question on StackExchange or ServerFault. Here is a good start: https://stackoverflow.com/questions/20353402/access-denied-for-user-testlocalhost-using-password-yes-except-root-user – ADreNaLiNe-DJ Mar 05 '18 at 12:00
  • Please do tell me you haven't just posted the server IP address, username & real password for access to your database. – PaulF Mar 05 '18 at 13:08

1 Answers1

1

There is multiple things you have to take into consideration while accessing mysql from another machine some them are -

Assuming you did write correct code

1.Change mysql config (my.ini) to receive packets from all IP

2.Add firewall Exception for port 3306 on machine where Mysql is Hosted

3.User name password is Correct and granted proper privileges.

PS:-Do not share server credentials on public forums

Mihir Dave
  • 3,954
  • 1
  • 12
  • 28
  • Firewall rule is already there, as the reply comes from the server, demostrating that there is communication. Most likely cause is your point 1 or a wrong password. – Alejandro Mar 05 '18 at 12:19
  • Also worth checking that the User is configured to allow access from the remote IP address. – PaulF Mar 05 '18 at 13:19