Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello
I have implement one application that contains some page of php and some page of asp.net. and i have deploy this app in iis server.Application is working fine with local data.but database does not connect with live database.how can connect with live database?

connection string in php file given below:
HTML
$conn=mysql_connect("example.com","user_name","password") or die(mysql_error()); $db = mysql_select_db("database_name",$conn);


connection string in web.config:
HTML
<add name="LocalMySqlServer" connectionString="Datasource=example.com;Database=database_name;uid=user_name;pwd=passwd;convert zero datetime=True" providerName="MySql.Data.MySqlClient"/>
Posted
Updated 9-Feb-15 22:21pm
v2
Comments
Kornfeld Eliyahu Peter 10-Feb-15 1:55am    
Does that connection works not in the context of your application?
anilkumar_pandya 10-Feb-15 4:40am    
connection work with local database but i want to update live database from local application.
Kornfeld Eliyahu Peter 10-Feb-15 4:42am    
That's not what I'm asking...I'm asking you if you were able to use that connection (not a local, but that one exactly) from any code, ever?
anilkumar_pandya 10-Feb-15 7:03am    
no

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