2
Answers

cpanel database connection

hi 
 
I am trying to establish mysql connection to my databse located in myserver with the following string :
  1. MySqlConnection connection = new MySqlConnection("SERVER=my_server's_public_ip ;PORT=3306;DATABASE=name ;UID=user;PASSWORD=password");  
it worked like a charm for a week and now i keep having ( can't connect to the specified host)
 
I didn't change anything
I can access phpmyadmin from my cpanel
I can ping my cpanel
 
please help
Answers (2)
1
Amit Gupta

Amit Gupta

NA 16.5k 25.7k 7y
Have you tried checking running the same in sql with the same credentials and servername? Have a look to this link https://blog.devoworx.net/2017/01/30/connection-timeout-expired-pre-login-handshake/amp/
Accepted
0
Umer Ali

Umer Ali

NA 65 1.3k 7y
yes when i login to sql server management it connects