the problem is, that you are not returning a MySqlConnection. What you could do is:
public static MySqlConnection m_con;
public static MySqlConnection GetConnection(string server, string user, string password, string db)
{
string str = "Server='" + server + "';user='" + user + "';password='" + password + "';database='" + db + "';";
m_con = new MySqlConnection(str);
con.Open();
isConnected = true;
return m_con;
}