0

I don't use localhost for mysql connections:

My code for MySQL connection:

Dim Conn As New MySqlConnection("server=mysql.hostinger.co.uk; user id=u691546972_***; password=*****; database=u691546972_db;")
Conn.Open()

My server is remote: mysql.hostinger.co.uk
During connection, MySqlConnection produces an exception:

Exception: MySqlException
Exception message: Unable to connect to any of the specified MySQL hosts.

Which is the issue with the connection?

  • Connecting to `mysql.hostinger.co.uk` port `3306` doesn't seem to work. Check if the host is correct and if they allow connections from outside. Maybe you have to use cPanel to include your IP address on the list of hosts allowed to make remote connections. – Havenard Mar 07 '15 at 00:11

2 Answers2

0

Replace host name with % is impossible, if it was possible, anyone could to enable remote mysql in free hosting services

Remote mysql is impossible on free hosting, only the paid hosting services offers remote mysql.

Solution: Upgrade your account to premium or use a paid hosting service.

  • I created a user with % after user name –  Mar 21 '15 at 15:28
  • No, user isn't with %: Example: user@%, the % is replaced You don't have the privileges in the server to create users, you use a free hosting service –  Mar 21 '15 at 15:30
0

Hostinger do not support remote MySQL connections for security and performance reasons. Look at here > http://www.hostinger.ph/knowledge-base/5.html

Dumindu
  • 9
  • 1