Click here to Skip to main content
15,867,704 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
I have been following a guide on here with this string code.

C#
connectionString = "SERVER=***;DATABASE=***;UID=***;PWD=***;" 
stars are my logins

when i try to connect i get the error Cannot connect to server. Contact administrator. everything is right my database name password and login what should i do?
Posted
Updated 23-May-14 12:17pm
v3
Comments
[no name] 23-May-14 17:14pm    
Everything is not "right" otherwise you would not be getting an error. Check everything. Is the computer running your server powered on? Is your server running? Is your server computer plugged into the network? Can you ping your server computer? Can you connect to the database with any other software?
Member 10840283 23-May-14 17:23pm    
Its not a computer running my server its a online mysql server.
[no name] 23-May-14 17:27pm    
Okay.... and how are we to know that? Contact the administrator of the server and ask them. We would not have any idea what you are doing.
Member 10840283 23-May-14 17:29pm    
All i need to know is if this is a correct connectionstring and what could cause this problem
[no name] 23-May-14 18:16pm    
Again, how are we to know that? We don't know anything about the server that you are trying to connect to.

 
Share this answer
 
MySql[^] connection strings should help you.
 
Share this answer
 

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