You are here:

C#/Inserting Data to MySQL Server

Advertisement


Question
I have to insert the data in mysql server, when I am inserting it in localhost it is working but when I insert it in remote host it is giving an error :
"Unable to connect to any of the specified MySQL hosts."

working connection string is :
"SERVER=localhost;DATABASE=inborn_talent;UID=root;PASSWORD=;"

not working connection string is :
"SERVER=173.192.76.44;DATABASE=inborn;UID=inborn;PASSWORD=inborn;"

Answer
Hi there,

1. option
Recheck your database information
2. option
Try to enable cPanel Remote MySQL Access
See here to learn how to do it.

Hope that helps,

Murat

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Murat Mehmet

Expertise

I can help with questions about desktop and web programming in C#, including SOAP, XML, database managing, custom controls, security etc.

Experience

I have been developing web and especially desktop applications in C# and VB.Net for almost 5 years. My programming life has begun with VB6 long time ago, so its about 8 years that I am in this business.

Organizations
Was in R & D for 2 years in a popular Turkish technology website: cyber-warrior.com

Education/Credentials
2011 Computer Engineering graduation in University of Trakia in Turkey.

©2016 About.com. All rights reserved.