Reputation: 257
I cannot seem to connect to my remote MySQL
database using C#. When I use MySQL Workbench
I am able to connect successfully. But when I connect via connection string with C# I get:
Access denied for user 'username'@'myipaddress' to database 'drawingnumbers'
My connection string:
connectionString = "server=" + server + ";user=" + uid + ";database=" + database + ";port=" + port + ";password=" + password + ";";
What I have tried:
Upvotes: 0
Views: 1525
Reputation: 1201
are you using the username suffix in CPanel, because people miss that in most cases... for example if your CPanel username was abc then it should be abc_TheUsernameForMySQL
if not, try your CPanel username and Password, also you can use the ip address from the error to confirm you added the correct remote ip address to access the mysql server
Upvotes: 1