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!

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? :(

Yes, show the exception not just your message:

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

Hey,

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

Can you recommend anything? I really need this ha!

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.