0

Hey,

I have a problem.. I'm working on my final project and wanting to do some database intigration, now I have chosen MYSQL to do it in, however, when I try and create a database (locally) it won't let me connect.. This is annoying!

So, is there any way that I can host a MYSQL database online, without having to buy a domain and then get hosting? I really just need ONE mysql database that I can connect too.

Any ideas please? Thank you very much!

2
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by Momerath
0

Okay,

I have found one... But it won't let me connect!!

Here is the code that I have:

MySqlConnection connection = new MySqlConnection("Server=mysql2.000webhost.com;Database=a1162277_account;Uid=a1162277_phil;password=");
            MySqlCommand command = connection.CreateCommand();
            command.CommandText = "SELECT * FROM accounts";
            try
            {
                connection.Open();
            }catch(Exception ex)
            {
                MessageBox.Show("Unable to connect to database");
            }

Any ideas? :(

Edited by Phil++: n/a

0

Yes, show the exception not just your message:

catch (Exception ex) {
    MessageBox.Show("Arg!" + ex.Message);
}
0

Hey,

All it says is 'Unable to connect to any of the MYSQL specified hosts'

Can you recommend anything? I really need this ha!

0

Well, it should be pwd not password for one thing. Does the provider require you connect on a specific port?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.