Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a database with a mssql database with a host. But I have several websites. Can they use the same connection string to share that database?


What I have tried:

I have try on google and cant find a solution.
Posted
Updated 20-May-19 2:18am

If they are on the same hosting service then yes.
If not, it will depend on whether the hosting service providing the database server allows external access.
 
Share this answer
 
Comments
christina p 18-May-19 7:10am    
Yes they have same hosting service.
If you can connect to the database (have permissions, know the ip address and instance name, etc), then yes, you can use the database from multiple web sites.
 
Share this answer
 
Hi Christina,

you can use same MySQL database for multiple websites with following points needs to take care
1. all websites are using same database connection string with no restriction on user access.
2. if different users are created on database they have full access for query executions.

in fact, I have used same DB for my 2 websites for capture customer details.. obvious I have used different table name for different websites.

Hope this will help you.

***Mark as Solution if found Helpful.
Jatinath
 
Share this answer
 
v2

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