Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote database connection

Status
Not open for further replies.

amanxman

Technical User
Oct 8, 2005
19
NZ
Hey,

I have a website powered by mySQL, written in .NET - with Microsoft SQL Server Management Studio Express as the SQL management software.

I am looking to develop an add on application for this website in PHP - so would make it on a seperate server (php) - but this new application will need access to the SQL (or at least aspects of it).

Will it be as simple as making the php site connect to the database remotely (so instead of localhost connect, it connects to the database at
Although of course, the database isn't stored at domain.com/blaa since it's somewhere in root level.

I figure that because we're connected SQL, it shouldn't matter that the two sites are in different languages...

So I guess the question is - how easy would it be to connect, using PHP, to this remote SQL database, on the .NET server?

Any thoughts, most appreciated
Cheers
 
As long as the database is accessible to the server that will have the PHP site on it, then yes you can access the SQL Server via PHP.

If you are connecting to the database with the Microsoft SQL Server Management Studio Express then you are using Microsoft SQL not MySQL. They are different products.

You'll be connecting to the hostname or IP address of the server running the database.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
If you are connecting to the database with the Microsoft SQL Server Management Studio Express then you are using Microsoft SQL not MySQL. They are different products."

Is the language fully compatible? i.e. can I use data from the Microsift SQL with an appliction designed for mySQL?

Cheers
 
yes, you can use the data

no, you cannot use the same SQL statements

neither SQL Server nor MySQL is fully ANSI SQL compatible (the forum you posted into)

r937.com | rudy.ca
Buy my new book Simply SQL from Amazon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top