473,385 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Accessing remote database with php

196 100+
Hi, iv made a php script which searches and retrieve rows from a database on server A, What i want to do now is to be able to access the same database on another server (server B), the reason for this is that multiple websites will have to be able to access the database which are all on different servers.


Thanks for any information,
Sep 16 '08 #1
5 1253
Atli
5,058 Expert 4TB
What's the problem?

All you should have to do is change the host address accordingly.
Sep 16 '08 #2
Markus
6,050 Expert 4TB
What's the problem?

All you should have to do is change the host address accordingly.
Well, considering the database doesn't change (If I'm not mistaken), you should just mysql_connect().

Cheers,

Mark.
Sep 16 '08 #3
chazzy69
196 100+
Ok i tried just the connecting it didn't work i got an error saying could not connect, couldn't find the address.

I fiddled a bit with the address trying to change it but it didn't seem to work.

for example the origional server name i used looked something like this

mysql.myservername.net (not really this)

this works locally but not on a remote server,

next i tried using the ip address that was associated witht he name for example

10.255.255.255 (not really this)

And neither option seemed to allow me to connect remotely,

Any suggestions???


Thanks for the help
Sep 17 '08 #4
Atli
5,058 Expert 4TB
Are you sure the host allows remote connections?
You will need to connect as a user that has been given remote access.

It's also possible that the server's firewall blocks the port MySQL uses. (usually 3306)
Sep 17 '08 #5
chazzy69
196 100+
That could be the case i will have to check if i can allow remote connections to the server.
Sep 18 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Jaydeep | last post by:
Hello, I am facing a strange problem. Problem accessing remote database from ASP using COM+ server application having VB components (ActiveX DLL) installed. Tier 1 : ASP front End (IIS 5.0) Tire...
2
by: Douglas Harber | last post by:
If I have DB2 8.1 (FP5, I believe, but not relevant to my question...I hope) installed on my desktop, do I have what I need to connect to a remote DB2 server (also running 8.1 FP5) from my desktop...
3
by: prodirect | last post by:
Hi all, I hope someone can help me. I've recently created a database and wanted to put it up on an ftp sight so that multiple people could access the same tables at the same time from different...
2
by: DavidR | last post by:
Hi, My development machine is running Win XP SP2 and IIS. I'm developing an ASP.NET application on this machine that accesses data from a SQL Server database on another machine. That machine...
8
by: Ray Stevens | last post by:
Because this worker process using the local ASPNET userid, it is unable to access Sql Server databases on a remote server. I believe the solution is to use a domain id and apply it to both... but...
2
by: Jeff | last post by:
Hi - I have an ASP.NET web page accessing a SQL database. It works fine on the web, and I'm trying to get it to also work in debug mode in the IDE. The "on the web" page and my SQL database...
0
by: John Fleming | last post by:
Hello, I am building a web application with the following components: 2 Web Servers - Windows Server 2003 - IIS 6 - .Net Framework version 2.0 - Reside in Domain A 2 Clustered Database...
3
by: Pakna | last post by:
Hello, I have what may be a beginner's question regarding DB2. How does one access a remote table on a remote database via SQL? What is the command string, is there an equivalent of Oracle...
5
by: Mike | last post by:
I'm having trouble accessing SQL2005 Standard Edition as a second instance of SQL Server where the first instance is SQL 2000 Enterprise Edition. I installed SQL 2005 as a named instance...
4
by: Noy B | last post by:
Hi, I have developed a small application that is using a MSAccess DB. the problem is that it was developed on a machine where the application and the DB are both located. now it needs to be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.