Hi,

I'm trying to make a rather simple Visual Basic app with which I can update some tables within my MySQL databases.

I've been following this tutorial from page 3 on, as the first 2 pages where on how to initialize a local MySQL database.

My MySQL database is on my website, so I thought I had to use the website's name instead of "localhost".

Anyways, I now use this code:

Dim connection As MySqlConnection
connection = New MySqlConnection()

connection.ConnectionString = "Server=resload.com; Uid=***; Pwd=***; Database=***;"

Try
    connection.Open()
    MessageBox.Show("Connection Opened Successfully")
    connection.Close()
Catch mysql_error As MySqlException
    MessageBox.Show("Error Connecting to Database: " & mysql_error.Message)
Finally
    connection.Dispose()
End Try

But it popups (don't now whether that's a real word :p) with the message:

Error Connecting to Database: Access denied for user '***'@'my ipaddress' (using password: YES)

I've spent a lot of hours searching for the solution and problem, but couldn't find a working answer. My question therefore is; do you know what is going wrong?

Greetz,

Ragoune

Hi
I've more experience with Microsoft SQL server but to me it looks like you are finding the database but don't have the rights to access.

Try pointing the server entry to somewhere that can't / doesn't exist do you get a different message? If so, that means you were getting to the DB it's just not letting you in...

I'm getting the same error when I select a database which doesn't exist. And what's Microsoft SQL server exactly?

If you are using a MYSQL from your hosting like yahoo.smallbusiness. It wont be possible or at least it wont be easy. You will need to build some web interface to interact with your application i.e. xml.

Thank you for your help. I've found the solution: follow these steps and it'll work:

Go to your webpages admin panel.
Click on MySQL management.
Click on the database to which you want to connect with your application.
Below you will see table named "Access Hosts". Here you only have to add the IP address from which the application is working.
You application will connect!

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.