I have a question.
I just created an app using WPF. and trying to connect the database to retrieve the data.
for the first time, I try to use the local database at my computer. using XAMPP and mysql.
Using the XAMPP, I can retrieve the data normally. Now I want to use the database at my website. But when I run the app, it fails and shows me this error message:
Access denied for user ‘[my user]’ (using password: YES)
FYI, I already created a username and password. I also granted all the privileges using the wizard, but still won’t work.
Here is my connection string:
MySqlConnection conn = new MySqlConnection("Server=[IP Address]; Database=[database name];Uid=[user id];Pwd=[password];");
Is there any mistake in my connection string?
finally i found the answer..
The answer is you just need to add server ‘%’ at your hosting. after add ‘%’, you can add another IP address for .NET app to access the database.
in .NET, change the server with the IP address that you add from your hosting. thanks.