LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2002, 10:05 AM   #1
safra
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Rep: Reputation: 15
MySQL install


Hi,

I installed Red Hat 7.3 the other day, chose for server setup and selected SQL as one of the packages to install.

I tested the mysql server through:

ps -aux | grep mysql

output looks like this:

root 1493 2.0 0.9 1760 600 pts/1 s 16:01 0:00 grep mysql


It seems it is working or not?

What I can't figure out is the directory where mysql is installed and I can't find anything about it in KDE?

The same for the Apache server?? I did find out the location of apachectl (/usr/sbin)

I like to install php now and I need to know the location of both apache and mysql for this, right?

Any hints?

Thanks,
Ron

Last edited by safra; 07-03-2002 at 10:10 AM.
 
Old 07-03-2002, 01:26 PM   #2
te_conway
Member
 
Registered: Apr 2001
Location: MA
Distribution: redhat 7.2
Posts: 182

Rep: Reputation: 30
Your grep is return your command grep request. Mysql isn't running. It would return as mysqld with a process id.

Apache probably isn't running either. You can use linuxconf to launch both on startup.

I think redhat puts mysqld in /var/lib/mysql and you have to type var/lib/mysqld -start to get it running. Valid switches are start|stop|status|restart.

Apache runs as httpd. If you do a ps -aux and see several instances of httpd then it's running. I'm not sure where the code is. The config file is probably in /etc/httpd/conf

try this from the command line as root:
find / -name httpd -print
then
find / -name mysqld -print
to get you httpd and mysql engine locations

If php wasn't installed with mysql support it won't work (and usually doesn't) until you install the correct modules.

-Tom
 
Old 07-03-2002, 05:40 PM   #3
safra
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks a lot!

I am learning bit by bit and it seems that a lot comes pre installed (among others php, perl in /usr/lib).

However I cannot find mysql, although there is something like pgsql in /usr/lib (postgre???).

And: find / -name mysqld -print
doesn't return anything

So probably I have to install mysql. Is it true mysql should be installed before PHP? And if so, can I simple re-install php afterwards or should I first take some steps regarding the existing php installation.

Thanks,
Ron
 
Old 07-03-2002, 05:46 PM   #4
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
Try find / -name mysql
the actuall start script is called safe_mysql

find the httpd.conf file and
grep php httpd.conf

My guess mod_php is installed already.
or
in document root create a file called info.php


-------------- info.php ---
<?php phpinfo(); ?>


Browse to:
http://localhost/info.php

That will tell you exiactly how apache and PHP are configured

BYA , MySQL and PHP home worlds are as followed:

http://php.net
http://mysql.com
 
Old 07-04-2002, 03:36 AM   #5
safra
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Original Poster
Rep: Reputation: 15
Hi,

The same for find / -name mysql
, nothing. I will try to install it myself.

Pickledbeans:

document root, which directory is this. Yesterday I tried to test the apache server and php but couldn't figure out where to put the .htm or .php files. One tutorial mentioned apache/htdocs as the right directory, but this one doesn't exist on my installation and when I create one and put files in there I get:

requested url was not found on this server.

Thanks,
Ron


ps. what is the difference between 'find / -name' and 'locate'
 
Old 07-04-2002, 09:18 AM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Open a terminal and enter 'which mysqld' without the quotes. That will tell you where the executable is located. On my distro, that's /usr/sbin/mysqld.

The difference between find and locate - find searchs the hard disk, or whatever directory you specify for the pattern you specify. Locate uses a database of files on the hard disk. You write the database with the command 'updatedb'. Every time you install,move, or remove something, run updatedb to re-write the locatedb. Then, when you want to know where something is, locate <filename> reads the locatedb. It's much faster than find. Find has capabilities that locate doesn't. A thorough read of the man pages would be helpful.
 
Old 07-04-2002, 10:44 AM   #7
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
bigrigdriver, does loocate every directory on the harddrive
or just the one the in the default path statement? i.e. if
I instll myslq in /opt/mysql will it find mysql if opt/mysql/ isn't in the path?
 
Old 07-04-2002, 10:54 AM   #8
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
safra, 4 files *you* need to locate/find on you box:

apachectl
httpd.conf
access_log
error_log

Use whereis, whitch, located and if all else find
httpd.conf will tell you where you doc root is, amoung
other usefull information
 
Old 07-04-2002, 02:19 PM   #9
safra
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks,

found document root in httpd.conf !
 
Old 07-07-2002, 11:41 AM   #10
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
OK --
put the info.php page mentioned earlier there and browse to it.

It will give you all kinds of good info about how apache and php are built on
your systems. And remember those log file locations, they come in handy
when troubleshoting a Apache problems

BYA, You could have also run httpd -V to get the locations of *.conf and logs
for Apache and of course /var/log/messages for gerneral system trouble shooting.

Last edited by pickledbeans; 07-07-2002 at 11:44 AM.
 
Old 07-07-2002, 01:00 PM   #11
safra
LQ Newbie
 
Registered: Jul 2002
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks!

I am getting into all of this. php is ok, I didn't have time to install mysql yet. Hopefully it won't give me to much problems getting the configuration with php right as I have read in several tutorials that mysql should be installed before php.

Ron
 
Old 07-07-2002, 01:06 PM   #12
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 31
I think RH installed PostgreSQL by default try psql and see what happens
 
  


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
Bugzilla - MySQL - perl - DBD::mysql install problem Runningonair Linux - Software 8 10-12-2007 01:42 AM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM
DBD::MySQL + MySQL install problems. Elleroth Linux - Software 4 03-24-2006 07:53 AM
MySQL 4 on Fedora can't install php-mysql kennyg Linux - Software 8 09-21-2004 07:54 PM
MySQL mysql-3.23.56-1.9, rpm install problem jacsmith510 Linux - Newbie 3 09-19-2003 03:02 PM


All times are GMT -5. The time now is 12:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration