redirect solaris database from linux database..

hi..

i have a need .. my php runs on my linux redhat box with mysql.. i want my php code to refer another mysql database
which is in solaris 10 x86... can u tell me the procedure ..
how it can be done through php .. sorry am new to php...
is it possible to redirect from linux mysql to solaris mysql...?

It's simple enough and doesn't really care whether the target is Linux or Solaris or whatever. What host you connect to is part of the mysql_open or mysqli_open or mysqli->open, etc. command. Right now it probably connects to "localhost", meaning, the local machine. Change that to the domain name of the server you want it to connect to.

That server must actually allow TCP connections to mysql, of course.

thanks ...
can u tell me In which file should i change...

Unfortunately there's not any one place they needed to put it. You could try grepping for mysql_open or mysqli_open or "new mysqli" in your PHP files. See these docs for what the code might look like. They might also be using the older mysql_connect system.

k thanks a lot... :slight_smile:

---------- Post updated at 11:49 PM ---------- Previous update was at 11:48 PM ----------

do u know the procedure to install php in solaris 10 x86... i tried both using ./configure and tried with package too.. both ended in failure...

Has your goal changed? You don't need PHP to have a Solaris mysql server.

Compiling your own packages is generally a last resort. Building and installing something manually can be dangerous if you don't know what you're doing since it doesn't have an "uninstall" function like a package manager does.

What exactly did you try and in what way did it not work? Always be specific.

actually i tried install mysql.. which i succeed and then apache,tomcat,oracle .. i installed all the above ...

but PHP is the only thing i didn install in my solaris server...

i tried to install php from sunfreeware package.. and then googled and tried to compile and build php .. i failed in both...

i dono how to install php on my solaris 10 x 86..

now i have a php soure file in linux.. and DB in solaris ... which i can successfully connect using ur guidance..

do u know the steps to install php in solaris 10 x86...

What did you try? In what way did it not work? Be specific.

Not precisely, no. Knowing what you tried will help a lot.