Click here to Skip to main content
15,891,828 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I have static IP
I need to connect the system using Static IP which is having database.
I have done Port forwarding from Modem.

I tried the
CONNECTION_STRING as
"server=STATIC IP;port=MYPORT;uid=USERID;pwd=PASSWORD";
It showing the error
Unable to connect mysql

I tried the
CONNECTION_STRING as
"UID=USERID;pwd=PASSWORD;Host=STATIC IP;Port=MYPORT;Database=user_details; Direct=true;Protocol=TCP;Compress=false;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;";

But no luck

What is the mistake? :(

Anyone can help me
Thanks
Saranya1388
Posted
Updated 6-Dec-10 19:22pm
v2

1 solution

Hi Saranya,

Try this

<add key="connectionStrings" value="Server=ip;Database=abc;Uid=xx;Pwd=yyy;use procedure bodies=true;treat tiny as boolean=false;allow user variables=true;use affected rows=true;" />

Its working with my code.
 
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