Since connecting seems to be the crux of your problem, be sure to use a connection string in the form:
string server = "XXX";
string database = "XXX";
string uid = "XXX";
string password = "XXX";
string connectionString =
"Server=" + server + ";" +
"Database=" + database + ";" +
"Uid=" + uid + ";" +
"Password=" + password + ";";
I've answered another question about using MySQL from C# that may be of further help by providing a little more context.
Also, be sure to print out or inspect connectionString
with your debugger if you still have trouble. Sometimes an error like you're seeing comes down to a simple flub that only becomes clear when you look at the full connection string you've built...and find that it is not what you expected.
Finally, be sure to test with a MySQL client too if trouble connecting persists. As with looking at the connection string you've built to find a simple mistake, sometimes a credentials test outside of your code with a trusted client will reveal that the credentials...truly do not work like you expected.