Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting the error "Unable to connect to any of the specified MySQL hosts" when i am connecting phpMyAdmin database


DatabaseProviderFactory db = new DatabaseProviderFactory();
SynchronizationService.database = db.Create("ConnectionString");


SynchronizationService.command=SynchronizationService.database.GetStoredProcCommand("Procedure");

SynchronizationService.command.Connection=SynchronizationService.database.CreateConnection();
SynchronizationService.command.Connection.Open();// I am getting error here and error massage is "Unable to connect to any of the specified MySQL hosts"

and connection string is

<add name="ConnectionString" providername="MySql.Data.MySqlClient" connectionstring="Server=server;InitialCatalog=databaseName;Uid=root;Pwd=password;Port=3306;">

Please help me to resolve this issue.

Thanks
Posted
Comments
Gyaneswar kumar 18-Nov-15 6:54am    
restart the MYSQL services by command line then try..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900