LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-10-2003, 06:35 PM   #1
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Rep: Reputation: 15
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.
 
Old 12-10-2003, 06:47 PM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
You need to start the mysql server.

Håkan
 
Old 12-10-2003, 07:08 PM   #3
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
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
 
Old 12-10-2003, 07:42 PM   #4
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
Nevermind about the PHP stuff.....Now about mySQL.....any takers?
 
Old 12-10-2003, 07:58 PM   #5
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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
 
Old 12-10-2003, 08:18 PM   #6
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
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.
 
Old 12-10-2003, 08:55 PM   #7
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
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.

 
Old 12-10-2003, 09:10 PM   #8
axion0917
Member
 
Registered: Nov 2003
Distribution: Arch Linux / LFS
Posts: 49

Rep: Reputation: 16
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
 
Old 12-11-2003, 04:47 AM   #9
fuelinjection
Member
 
Registered: Nov 2003
Location: County Durham, England
Distribution: Fedora
Posts: 238

Rep: Reputation: 30
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.
 
Old 12-11-2003, 04:48 AM   #10
fuelinjection
Member
 
Registered: Nov 2003
Location: County Durham, England
Distribution: Fedora
Posts: 238

Rep: Reputation: 30
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
 
Old 12-11-2003, 05:32 AM   #11
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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
 
Old 12-11-2003, 10:11 AM   #12
phekno
Member
 
Registered: May 2003
Distribution: Gentoo, Slackware
Posts: 75

Original Poster
Rep: Reputation: 15
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!
 
Old 12-11-2003, 12:10 PM   #13
andrewlkho
Member
 
Registered: Jul 2003
Location: London
Posts: 548

Rep: Reputation: 30
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]
 
  


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
mysql-installation: Not enough space in /var/lib/mysql/ linus123 Linux - Software 8 11-10-2006 02:19 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM
Mysql installation yussef Linux - Software 1 06-13-2005 11:49 AM
MySQL 3.23.58-14 installation prolem - mysql.sock not found lightcom Linux - Software 4 02-23-2005 12:46 AM
php4 mysql, installation, php-pages with mysql info stay empty dnla Linux - Software 2 03-14-2004 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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