LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-05-2006, 06:26 AM   #1
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Rep: Reputation: 15
Remote Mysql connectivity support???


Hello folks,

I have two Linux red hat 9 servers. On one php 5.1 is configured with Apache and Oracle is the database. I have the other server configured with mysql database. I need to access the mysql database from server 1. My dilemma is, "Do I need to install mysql and reconfigure php in Server 1 to enable mysql support??" OR "Is there somethng that will enable mysql support without installing mysql"

Can somebody help me with the requirements to achieve the same. Any help is appreiated??? Thx a ton.
 
Old 05-05-2006, 07:03 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
If you have installed PHP from RPMs, then you just need the correct php-mysql RPM and that should take care of it.

If you have installed from source, you'll need to recompile it to add MySQL support by including --with-mysql in the configure command. PHP 5 and greater no longer includes MySQL support by default, nor is it bundled with the headers and libraries. You won't need the full installation of MySQL, but you will need to install the headers and libraries for the appropriate MySQL version. You will want MySQL-devel-standard installed on Server 1 for whatever version of MySQL you have on Server 2. You can download it here: http://dev.mysql.com/downloads/
 
Old 05-05-2006, 07:17 AM   #3
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Original Poster
Rep: Reputation: 15
Thx zaichik for your response. I really appreciate that. I have installed Php5.1 from source. My installed Mysql version is 5.0.15. Could you please let me know the exact number and names of header files and libraries that needs to be installed. I clicked on the downloads link but really didnt find anything specific. I am still looking though.

I am really sorry if the question is elementary but since this is a clients server I really dont want to install and uninstall unwanted things. I hope you understand my situation. Thx very much for the help. Waiting for your response.
 
Old 05-05-2006, 07:27 AM   #4
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Here, run with this one:

http://dev.mysql.com/get/Downloads/M.../mysql.he.net/

It's 5.0.21 instead of 5.0.15 but it should be fine for compiling PHP against it.
 
Old 05-05-2006, 07:57 AM   #5
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Original Poster
Rep: Reputation: 15
Thx zaichik once again. I have downloaded it. Will try to configure it with php and try the remote connectivity with Mysql. Hopefully it should go smoothly. Just one more thing: Is there any special configuration required on the Mysql server like creating users and granting rights and privileges etc or simply use the server 2 ip, mysql root and password in my php configuration file on server 1. Thx in advance.
 
Old 05-05-2006, 08:04 AM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
Absolutely there is access configuration needed. You will need to set up a user@host combination, provide a password (highly recommended) and grant them the necessary privileges to execute the queries they need on the database(s) and table(s).

You'll want to thoroughly understand the MySQL privilege system before you starting allowing access from remote hosts. Their online docs on this (http://dev.mysql.com/doc/refman/5.0/...ge-system.html) should help out considerably.
 
Old 05-05-2006, 08:19 AM   #7
rajnair0278
Member
 
Registered: Mar 2006
Posts: 62

Original Poster
Rep: Reputation: 15
Thx a toooooooooooooooonnnnnnnnn for all the help zaichik. Had lot of doubts before posting these questions but feeling much better. Will do the necessary steps and update this thread soon. You have a nice day buddy. Cheeers.
 
Old 05-05-2006, 09:14 AM   #8
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
You're welcome. If you have any more questions, especially about the MySQl privilege system, I'll be glad to help out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connectivity of jsp file with mysql in fedora core 4 anshu.rahul Fedora 0 05-03-2006 08:37 AM
LXer: Logicblaze, MySQL Enable SOA for LAMP, AJAX Connectivity LXer Syndicated Linux News 0 05-01-2006 06:03 AM
VisualBasic to mySQL connectivity???? odious1 Linux - Software 3 05-06-2004 09:49 PM
php4 mysql connectivity bm1 Programming 4 02-19-2004 07:23 PM
Database Connectivity (Mysql) hubergeek Linux - Networking 1 03-18-2002 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration