im trying to connect to a DB on my website. im using .NET dll from MySQL website (they have version 1.0.9 and 5.0.3, i've tried both with the same result). i've added %.my_inet_provider.net to Access Hosts in CPanel, but when i run the code i get following:
Exception: Access denied for user 'my_username'@'%.my_inet_provider.net' to database 'my_database'
my user, pass, and DB are 100% correct. the IP was given to me by my Hosting provider, i explained to them what i need it for.
What am i missing? i would greatly appreciate any help, i don't know anything about MySQL, yet.
this is the code im using:
MySqlConnection conn;
conn = new MySqlConnection("server=xx.xx.xx.xx;uid=my_user;pwd=my_password;database=my_db");
try
{
conn.Open();
Console.WriteLine("Connection OK!\n");
conn.Close();
}
catch (Exception ex)
{
Console.WriteLine("Exception: " + ex.Message + "\n");
}
before that I downloaded the Connector without installer from this site, unzipped, and copied the two .DLL and one .XML files into my project folder and added the refference. it build fine, so i guess it means its ok the way i did it?