I have create a winform application but i want every time before the users access to winform to complete a login form. Then i would like to connect with my remote mysql on my server to check if user is ok or not. I have write the source code which you will find below but i can't connect to my remote mysql.
I got an error "unable to connect to any of the specified mysql hosts".
I find that you must to open some ports on firewall to have access to your remote server but this is not easy. I can't tell to every person who will use the program to change firewall setttings. I am trying to find a way to check the user for my remote mysql database without all this changes.I just want to check the user account from internet for the winform application.
My source code is :
MySqlConnection c = new MySqlConnection("server=ipofserver; database=login; uid=admin; pwd=pass");
catch (MySqlException e)
int n = e.Number;
MessageBox.Show(n + e.Message);