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 |
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 |
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 |
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 |
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' |
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. |
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? |
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 |
Thanks,
found document root in httpd.conf ! |
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. |
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 |
I think RH installed PostgreSQL by default try psql and see what happens
|
All times are GMT -5. The time now is 01:11 AM. |