BP Forums
Database error anyone help? - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Programming Discussion (https://bpforums.info/forumdisplay.php?fid=34)
+--- Forum: VB.NET (https://bpforums.info/forumdisplay.php?fid=43)
+--- Thread: Database error anyone help? (/showthread.php?tid=917)

Database error anyone help? - sc2142 - 01-24-2017

Im trying to connect my vb.NET Application to my database witch is on my website. Im getting this error: 

"An unhandled exception of type 'MySql.Data.MySqlClient.MySqlException' occurred in MySql.Data.dll 

Additional information: Unable to connect to any of the specified MySQL hosts." 

The error is being called on "sconnection.open()" 

Ive searched google and i cant find whats wrong. My site is through Hosting24. Code: http://pastebin.com/Gd4JCakQ

RE: Database error anyone help? - Bobadilla - 08-28-2017

(01-24-2017, 03:54 PM)sc214e 2 Wrote: Im trying to connect my vb.NET Application to my database witch is. Im getting this error:

Hi sc2141, I just got the same error. Did you find a fix?

RE: Database error anyone help? - brandonio21 - 11-25-2017

Hello sc2142 and Bobadilla! Welcome to BP forums and thanks for posting.

Assuming that the MySQL host is properly setup with Hosting24 and that your connection string is correct, I think the most probable cause of this error is a lack of permission. Usually, MySQL databases only allow access to the database from the same machine that the database is running on.

That is to say, I believe this error is happening because your database does not allow connection from remote hosts.

What kind of control panel does Hosting24 give you? There should be a setting somewhere about MySQL remote connections, where you should whitelist access from either:
1. Your machine's IP address
2. All IP Addresses (

Hope this helps and keep us updated on your progress!