LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-20-2003, 10:12 AM   #1
vher
LQ Newbie
 
Registered: Dec 2002
Posts: 17

Rep: Reputation: 0
accessing mysql from apache/php


how do i configure my mySQL working from accessing PHP

i configure all the packages from installations select them individual and i have change the password for the mySQL but eventually i still cant access my database i even put it in startup so that it will start the program upon boot up...

so is there anybody can help me how to configure it..

my friend told me to configure it individual like install the packages from tar.gz

like install the mySQL first then apache and php...

but is there any other way so that i might not going to uninstall all the packages i installed from installation of linux..

by the way my RH version is 8.
 
Old 01-20-2003, 11:26 AM   #2
Donald1000
Member
 
Registered: Oct 2002
Location: Germany
Distribution: Debian, Non-Linux: Solaris, FreeBSD
Posts: 107

Rep: Reputation: 15
First download Apache 1.3.27.tar.gz. Then do a ./confiugre --prefix=/web/apache --enable-shared=max; make; make install
Then download PHP. Confiugre it with ./configure --with-apxs=/web/apache/bin/apxs --enable-ftp; make; make install. Add in httpd.conf this lines:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
AddType application/x-httpd-php-source .phps
Install MySQL with ./configure --prefix=/web/mysql --with-innodb; make; make install (my take a while). Copy from your MySQL Source Directory/support-Files the my-small.cnf in /etc/my.cnf
Then type:
chown -R root /web/myswl
chown -R mysql /web/mysql/var
chrp -R deamon /web/mysql
Start MySQL with /web/mysql/bin/safe_mysqld --user=mysql &
Test it with /web/mysql/bin/mysqladmin -p ping

You can pick other install directories for Apache etc. This is one example you can do it.
Hope this help!

Greetings

Last edited by Donald1000; 01-20-2003 at 11:28 AM.
 
Old 01-21-2003, 12:05 AM   #3
vher
LQ Newbie
 
Registered: Dec 2002
Posts: 17

Original Poster
Rep: Reputation: 0
but i already installed my apache, php and mysql from package upon installing the linux rh8 so what im just asking is if there a way i can configure my apache and php to access my mySQL database... can i still recompile the installed apache/php? coz i installed it as RPM from the installation..

what u saying is that i have to uninstall the package from my previous installtion and re install the new downloaded files.
 
Old 01-21-2003, 12:49 AM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Well you are going to have to write a php script to access info from your database, right? What are you trying to do? If you already have some web apps or scripts for talking to MySql just use them, it should work fine.

If you need to make accounts and create DB's and tables then consult the MySql docs at www.mysql.com or else there are thousands of tutorials out there. Just serch for php + mysql...
 
Old 01-21-2003, 08:06 AM   #5
Donald1000
Member
 
Registered: Oct 2002
Location: Germany
Distribution: Debian, Non-Linux: Solaris, FreeBSD
Posts: 107

Rep: Reputation: 15
I want to say, that when you've installed the stuff like discribed above, and create a DB in MySQL, like bulliver sais, there will be no Problem to access your Database.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL, PHP with Apache saudoi Solaris / OpenSolaris 12 11-19-2005 12:47 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
Accessing MySQL from a PHP script (locally) lowpro2k3 Linux - Software 2 11-23-2003 09:50 PM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM
accessing mysql from apache/mysql vher Linux - Newbie 1 01-17-2003 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:46 AM.

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