0

try to connect mysql database outside local internet, i got

msg show up :

Host '19.108.95.17' ins not allowed to connect to this mariaDB server

19.108.95.17 = not my currently public ip, but it old one before renew ip

let me say my currently ip : 15.100.80.30 (public ip)

my code :

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

 MysqlConn = New MySqlConnection
 MysqlConn.ConnectionString =

"server=15.100.80.30;port=3306;userid=root;password=password;database=mydatabasee"


 Try
        MysqlConn.Open()
        MessageBox.Show("Connection Successful")
        MysqlConn.Close()

    Catch ex As MySqlException
        MessageBox.Show(ex.Message)
    Finally
        MysqlConn.Dispose()
    End Try

End Sub
Bego.
  • 29
  • 2
  • 7
  • It is usually a bad idea to expose a database to the internet (e.g. the [SQL Slammer worm](https://en.wikipedia.org/wiki/SQL_Slammer) took advantage of that happening), so there is probably no rule in the host's firewall to allow it. – Andrew Morton May 11 '19 at 19:30
  • @AndrewMorton okey i think i fixed it by add port 3306 as forwarded, now it showed me this message (host 'ip_hiden' is not allowed to connect to this mariaDB server) – Bego. May 11 '19 at 19:46
  • Possible duplicate of [Host 'xxx.xx.xxx.xxx' is not allowed to connect to this MySQL server](https://stackoverflow.com/questions/1559955/host-xxx-xx-xxx-xxx-is-not-allowed-to-connect-to-this-mysql-server) – Andrew Morton May 11 '19 at 20:48

0 Answers0