Click to See Complete Forum and Search --> : MySQL install after Apache/PHP already installed
Pocket_Aces
10-20-2004, 12:53 PM
Hey, I have a simple question that I'm hoping someone will be able to help me with before I break my system or re-install anything.
I have had apache and php working on my redhat 9 box for several months, but I'm now working on a project that requires a database. I just got MySQL successfully installed (thanks for the help in the other thread).
I now want/need to get Apache, MySQL, and PHP all working together properly. All the guides and tutorials I find on the internet and the books I have all assume you are starting with nothing and installing all three at once.
Is there an easy way to reconfigure Apache and PHP now that MySQL is installed? And can I do so without losing the settings and configurations I have for them?
If not I guess I'll just make a few backups and then re-install.
Thanks,
Pocket Aces
ph34r
10-20-2004, 01:09 PM
What does phpinfo() show regarding mysql support? If your php install already has mysql support, then you are good to go...
Pocket_Aces
10-20-2004, 01:27 PM
It is not configured for any database, Heres what phpinfo shows if you're curious:
Build Date Jul 21 2004
Configure Command './configure' '--with-apache=../apache_1.3.19' '--without-mysql' '--prefix=/usr/local/php4'
My question is can i easily change that to for instance... "--with-mysql" or do i have to completely redo the install to re-configure?
Thanks,
Pocket Aces
blingbling!!
10-20-2004, 01:53 PM
From the php manual... (http://justlinux.com/forum/newreply.php?s=&action=newreply&threadid=134487)
12. make install
If you decide to change your configure options after installation,
you only need to repeat the last three steps.
hth
--Robin
Pocket_Aces
10-20-2004, 03:41 PM
Thanks, I'll do that as soon as I figure out where to haha.
I can't find/figure out/remember where I installed everything. It was several months ago and I was even more clueless at that time. Now I'm searching through my directories trying to figure out where the ./configure command is found.
its not in /, /root, /var, or /usr/local/php4 and I don't have any /apache or /php folders.
Note to self: take notes next time.
Thanks for the info
Pocket Aces
linux_composer
10-20-2004, 03:46 PM
I would hope it's in /usr/src/phpx.y.z or something similar to that...
If all else fails, you could try
locate php | grep configure
EDIT:
I can't find/figure out/remember where I installed everything.
Did you install from source, RPMs, or the install when you first installed RH from the CDs?
Pocket_Aces
10-20-2004, 03:53 PM
I installed from the RPMS. I *thought* i did everything from just the root directory but I don't know. I installed apache and php in the first few weeks I was using linux, so I was about as newbish as a person can be. I wonder if theres a log file somewhere that tells me everything?
thanks
pocket aces
linux_composer
10-20-2004, 03:57 PM
It's *ages* since I've used a red hat distro properly: I have a small server in one place at work, though it is not connected to the net yet (therefore I can't SSH into it like my Gentoo servers in another building to have a look). It's running Fedora Core 2 but I haven't specifically installed anything other than Apache as far as http goes.
You could try installing MySQL from the RPM and see if it's clever enough to install the necessary components...
I'm not the right person to ask about RH so I don't know why I wrote this reply really! :confused:
EDIT:
There's always something else to add... You won't have any source to configure, because you installed from the RPMs which are already compiled for you.
blingbling!!
10-20-2004, 05:30 PM
oops! (http://www.php.net/manual/en/install.unix.apache2.php)
Pocket_Aces
10-20-2004, 06:57 PM
*edit*
Well, I just finished re-installing mysql for the um... 4th time now. Still getting errors. For instance:
issuing the command "mysql mysql" i get
"Error 1045: Access denied for user: 'root@localhost' (Using password: NO)
so then I try "su mysqladmin" and get
su: user mysqladmin does not exist
even though at install it tells me "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /user/bin/mysqladmin -u root -h xxx.xxx.xxx.edu password 'new-password'"
Any advice?
About ready to change to a business major
pocket aces
linux_composer
10-20-2004, 06:59 PM
It will do, because the database of the filesystem updates periodically. Typically, it's a daily cron job.
To manually update the database, issue the command "updatedb" as root, wait a short while (depending on how many files there are on your filessytem) and then try the search again.
Search updatedb and slocate for more info on that one!
Pocket_Aces
10-20-2004, 07:20 PM
i should also add, i just checked my /etc/hosts and the file is blank, 0KB, is this related to the error message?
I'm really lost right now, I've gotten information from about 200 different websites and forums, and I think a lot of it must be outdated or wrong, it just can't be this hard to install mysql.
Thanks for all the help.
pocket aces
linux_composer
10-20-2004, 07:35 PM
MySQL is installed! The best thing you can do is read as much as you can about MySQL and setting it up. Using it is one thing, but setting it up is a very different matter.
Unix user names and MySQL user names have *no* correlation whatsoever. You have to set MySQL's own users up in mysql-admin.
I got a brilliant book (yes, a paper book!! :D ) called "Apache, PHP and MySQL" and is a so-called 'crash course' that one is supposed to be able to take over a weekend. I never did go through it step by step, as I needed a reference book to dip into rather than a tutorial. It's been of immense value, especially when getting to grips with MySQL.
I'd advise you look at something like that -there will be similar tutorials on the web, so go to google. 'Tis your friend!