mySQL installation?
I have a server with Slackware 9.1 installed on it. When I installed I made sure I installed all packages (including mySQL, PHP, and Apache). I started reading stuff about mySQL and PHP and decided to install them. So I used pkgtool to get rid of the original installations of these and then downloaded and compiled new versions of these. While I was trying to configure PHP (./configure --with-apache=/usr/local/apache --with-mysql=/usr/local/mysql) I got an error message saying that it couldn't find a valid apache installation or something. So then I decided to just re-install what was on the Slackware disc and now I don't know what to do. I know apache is running because I can see my webpage, but I can't tell if mySQL is working or not. I guess I would like to know how to do that. When I run "mysql" I get an error saying it can't open a mysql sock in /tmp/mysql.sock or something. Any suggestions?
Thanks, Phekno P.S. I'm a complete newb when it comes to mySQL and PHP so be gentle. :) |
You need to start the mysql server. :)
Håkan |
PHP also doesn't work. I made a really simple test page for it. Looks like this:
<HTML> <BODY> <?php phpinfo(); ?> </BODY> </HTML> When I try to access this page I get nothing which would lead me to believe that PHP is also messed up. Any suggestions? Thanks, Phekno |
Nevermind about the PHP stuff.....Now about mySQL.....any takers?
|
Again: You need to start the mysql server in order for the mysql.sock file to exist.
I'm not familiar with Slackware, but if there is a mysql script in /etc/init.d run that (something like /etc/init.d/mysql start). If not, see what mysqld_safe or mysql.server does. Håkan |
Here's what I get when I run the daemon:
root# ./rc.mysqld start root# Starting mysqld daemon with databases from /var/lib/mysql 031209 20:19:17 mysqld ended Then it just sits there. If I press <enter> it goes back to a prompt. |
OK after that last post someone is sure to ask what my error log looks like and here it is:
031209 20:55:56 InnoDB: Started 031209 20:55:56 Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist 031209 20:55:56 Aborting 031209 20:55:56 InnoDB: Starting shutdown... 031209 20:55:59 InnoDB: Shutdown completed 031209 20:55:59 /usr/libexec/mysqld: Shutdown Complete 031209 20:55:59 mysqld ended So there you have it. :) |
make sure you have both the default 'mysql' and 'test' directories under the data directory of the installation. this is usually /usr/local/mysql/data
|
Or, what I did was, removed all installations of mysql php and apache.
then visited http://www.apachefriends.org/lampp-en.html downloaded the package they have, and installed it, it took 5 minutes to install and I was up and running straight away. I know its the cheats way of doing it, but I was getting no where at all trying to install them all singlely. |
the package installs all of the following :
Apache 2.0.48, MySQL 4.0.16, PHP 4.3.3 & PEAR + SQLite 2.8.6 + multibyte (mbstring) support, Perl 5.8.0, ProFTPD 1.2.9, phpMyAdmin 2.5.4, OpenSSL 0.9.7c, GD 2.0.1, Freetype2 2.1.0, libjpeg 6b, libpng 1.2.2, gdbm 1.8.0, zlib 1.1.4, expat 1.2, Sablotron 1.0, libxml 2.4.26, Ming 0.2a, Webalizer 2.01, pdf class 009e, ncurses 5.8, mod_perl 1.99_08, FreeTDS 0.60, gettext 0.11.5, IMAP C-Client 2002b, OpenLDAP (client) 2.1.22, mcrypt 2.5.7, mhash 0.8.18, Turck MMCache 2.4.4, cURL 7.10.7 |
It seems you need to create the default tables. This is done automatically with the mysql_install_db script. You then need to set a strong password for root and set up users, etc.
Håkan |
fuelinjection: I tried the LAMPP installation and it went flawlessly. I did it remotely because I'm at work. One problem. My ISP blocks port 80. I edited my httpd.conf file and put it to a port that wasn't being used and was open on my firewall and I got nothing. I'm not sure if it's something the IT department did here (at work) or what. Anyway I flushed my iptables thinking that would work and now I can't even ssh into my box anymore. WTF?
Thanks for the suggestion to use LAMPP, though. It seems to be what I need! Thanks fuelinjection! |
mm..if you want to fix the original problem, about not being able to parse php, check your httpd.conf for a line like
Application type .php....or something like that [can't remember exactly what it's like] |
All times are GMT -5. The time now is 05:17 PM. |