I cannot connect a visual basic application to my Azure MySQL database (the visual basic application is running on a different computer).
For background, one of the functionalities of the visual basic app is displaying data in a table and being able to search for data from a specific date in the dataset.
(Ex: calling rows that have a date of 2/6/2023 in the Date column)
This is the error message I receive each time I try to run my visual basic app/form and try to retrieve the data from the MySQL database:
“Authentication to host ‘project.mysql.database.azure.com’ for user ‘[email protected]’ using method ‘caching_sha2_password’ failed with message: Access denied for user ‘[email protected]’@’IP address is here’ (using password: YES)”
The connection string in visual basic looks like this:
Dim connectionString As String = “Server=project.mysql.database.azure.com;Port=3306;Database=adb_dev;Uid=user1;Pwd=passwordhere;”
So far, these were the steps taken after receiving the error message mentioned above:
-
As a start, both MySql.Data and MySqlConnector packages are installed in visual basic.
-
Since the error mentioned an authentication method ‘caching_sha2_password’ failing, I changed the authentication method for the user ‘user1’ in MySQL from ‘mysql_native_password’ to ‘caching_sha2_password’. After doing this, the client side tried to connect to the MySQL database and received the same error message as before (so there was no connection in either instance).
-
I double checked if the client side needed to download the Connector/NET from MySQL if it was not already installed. After doing this, the client side tried to connect to the MySQL database again and received the same error message as before.
I am not sure what next steps to take in resolving the error message – or if there is something I am completely missing – have never used visual basic – I am more so just trying to get the connection to my MySQL database to work for the client side.
myk9 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.