Reputation: 371
I have a website using PHP and MySQL Database that hosting ready. I want to upload data to website by using windows application using VB.net but I cannot connect to database. I try this code to connect to Mysql database:
Dim conn As MySqlConnection
conn = New MySqlConnection()
conn.ConnectionString = "Host=www.mydomain.com; user=test; password=****; database=test;pooling=false"
Try
conn.Open()
Catch myerror As MySqlException
MsgBox("Error connecting to database! " & myerror.Message)
End Try
This is message error:
"Error connection to database! Access denied for user 'test'@114.134.189.135' (using password: YES)".
Please help me to solve it.
Upvotes: 0
Views: 665
Reputation: 648
1.Verify that MySQL service is running on your target machine
2. Ensure that user 'test' having the password 'YES'<br>
2.1 Please login any MySQl UI (Eg.,SQLYog)with your username and password for confirmation
3. If not, create a new user
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Upvotes: 1