LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-09-2003, 10:49 AM   #1
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Rep: Reputation: 15
Mysql error


Everytime i try to install LAMP, i get to the first part where i install MySQL and it wont let me start mysql. It claims theres a bind on the port 3306 and that there may be a server already running. I had mysql installed before, and it was working, just wasnt working with php.

how do i go about cleaning up all previous installs, so that i can start out without any mysql on my computer and start over fresh with it?
 
Old 04-09-2003, 12:43 PM   #2
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
What distro ?
 
Old 04-09-2003, 12:45 PM   #3
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
redhat 8, mysql 3.22.55
 
Old 04-09-2003, 01:25 PM   #4
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Stop the running service:
/sbin/service mysqld stop

To find out mysql/related packages:
rpm -qa | grep mysql

Erase them:
rpm -e results from previous step.
 
Old 04-09-2003, 01:33 PM   #5
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
There are is an RPM that i have to uninstall before it will let me remove the mysql rpm. its like 'perl-dbd-mysql' or something. But it wont let me remove that because its dependent on the mysql rpm. so how would i go about removing them if neither one lets me till the other is gone ?
 
Old 04-09-2003, 01:45 PM   #6
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Try
rpm -e --nodeps
 
Old 04-09-2003, 02:01 PM   #7
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
it's still giving me this in the error log:

030409 14:09:45 mysqld started
030409 14:09:46 Can't start server: Bind on TCP/IP port: Address already in use
030409 14:09:46 Do you already have another mysqld server running on port: 3306 ?
030409 14:09:46 Aborting

030409 14:09:46 /usr/local/mysql/3.23.55/libexec/mysqld: Shutdown Complete

030409 14:09:46 mysqld ended




I tried a few LAMP tutorials, including this one: http://lamps.efactory.de/e-archive.shtml
 
Old 04-09-2003, 02:10 PM   #8
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Let's see what's going on with TCP port 3306
netstat -ntla | grep 3306
 
Old 04-09-2003, 02:15 PM   #9
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
 
Old 04-09-2003, 02:36 PM   #10
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
netstat -ntlap | grep 3306 ( as root )

That should give you the pid and the name of the process that's using 3306.

kill the pid. Rerun netstat. kill -9 if still alive.

Try again. If that doesn't work, post your process listing.
ps -axfw
 
Old 04-09-2003, 02:45 PM   #11
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
737/mysqld

Tried 'kill 736' and 'kill -9 736' and neither one worked. still shows up in netstat.

process listing..

PID TTY STAT TIME COMMAND
1 ? S 0:04 init [5]
2 ? SW 0:00 [keventd]
3 ? SWN 0:00 [ksoftirqd_CPU0]
4 ? SW 0:04 [kswapd]
5 ? SW 0:00 [bdflush]
6 ? SW 0:00 [kupdated]
7 ? SW 0:00 [mdrecoveryd]
11 ? SW 0:01 [kjournald]
67 ? SW 0:00 [khubd]
159 ? SW 0:00 [kjournald]
508 ? S 0:00 syslogd -m 0
512 ? S 0:00 klogd -x
529 ? S 0:00 portmap
548 ? S 0:00 rpc.statd
660 ? S 0:00 /usr/sbin/sshd
674 ? S 0:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid 1101 ? S 0:06 \_ fam
737 ? S 0:00 /usr/libexec/mysqld --defaults-file=/etc/my.cnf --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pi
738 ? S 0:00 sendmail: accepting connections
748 ? S 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
758 ? S 0:00 /usr/sbin/privoxy --user privoxy privoxy --pidfile /var/run/privoxy.pid /etc/privoxy/config
767 ? S 0:00 gpm -t ps/2 -m /dev/mouse
788 ? S 0:00 cannaserver -syslog -u bin
797 ? S 0:00 crond
878 ? S 0:00 xfs -droppriv -daemon
896 ? S 0:00 /usr/sbin/atd
909 ? S 0:00 rhnsd --interval 120
929 tty1 S 0:00 /sbin/mingetty tty1
930 tty2 S 0:00 /sbin/mingetty tty2
931 tty3 S 0:00 /sbin/mingetty tty3
932 tty4 S 0:00 /sbin/mingetty tty4
933 tty5 S 0:00 /sbin/mingetty tty5
934 tty6 S 0:00 /sbin/mingetty tty6
935 ? S 0:00 /usr/bin/gdm-binary -nodaemon
986 ? S 0:00 \_ /usr/bin/gdm-binary -nodaemon
987 ? S< 32:48 \_ /usr/X11R6/bin/X :0 -auth /var/gdm/:0.Xauth
1024 ? S 0:01 \_ gnome-session
1088 ? S 0:00 \_ /usr/bin/ssh-agent /usr/share/apps/switchdesk/Xclients.gnome
1091 ? S 0:01 /usr/libexec/gconfd-2 9
1093 ? S 0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=14
1095 ? S 0:33 /usr/bin/metacity --sm-client-id=default1
1097 ? S 0:01 gnome-settings-daemon --oaf-activate-iid=OAFIID:GNOME_SettingsDaemon --oaf-ior-fd=12
1113 ? S 0:21 gnome-panel --sm-client-id default2
1115 ? S 1:58 nautilus --no-default-window --sm-client-id default3
1117 ? S 1:42 magicdev --sm-client-id default4
1120 ? S 0:00 pam-panel-icon --sm-client-id default0
1123 ? S 0:00 \_ /sbin/pam_timestamp_check -d root
1122 ? S 1:57 /usr/bin/python /usr/bin/rhn-applet-gui --sm-client-id default5
1196 ? S 4:09 /usr/lib/mozilla-1.0.1/mozilla-bin
1223 ? Z 0:00 \_ [netstat <defunct>]
1296 ? S 0:01 /usr/libexec/nautilus-throbber --oaf-activate-iid=OAFIID:Nautilus_Throbber_Factory --oaf-ior-fd=18
2083 ? S 0:00 /usr/bin/perl /usr/src/webmin-1.080/miniserv.pl /etc/webmin/miniserv.conf
7097 ? S 0:03 /usr/libexec/nautilus-text-view --oaf-activate-iid=OAFIID:Nautilus_Text_View_Factory --oaf-ior-fd=22
25430 ? S 0:03 /usr/bin/gnome-terminal
25431 pts/0 S 0:00 \_ bash
26098 pts/0 R 0:00 \_ ps -axfw
 
Old 04-09-2003, 02:45 PM   #12
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
hmm. it seems like 736 isnt there.. lemme try killing 737
 
Old 04-09-2003, 02:49 PM   #13
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
okay i killed it , now i get that 'table mysqld.host doesnt exist' or something like that, so im going to try and reinstall mysql.
 
Old 04-09-2003, 03:29 PM   #14
DoobyWho
Member
 
Registered: Feb 2003
Posts: 50

Original Poster
Rep: Reputation: 15
okay - i was following this ... http://lamps.efactory.de/e-lamps-1-3.shtml .. but it doesnt say anywhere how i need to configure and make and install it.... please advise!


edit: ok , i got that.... but now.. I was following
http://lamps.efactory.de/e-lamps-2-0.shtml


and now this comes up:

030409 16:40:30 mysqld started
030409 16:40:30 /usr/local/mysql/3.23.53/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
030409 16:40:30 mysqld ended

Last edited by DoobyWho; 04-09-2003 at 04:29 PM.
 
Old 04-09-2003, 05:46 PM   #15
nxny
Member
 
Registered: May 2002
Location: AK - The last frontier.
Distribution: Red Hat 8.0, Slackware 8.1, Knoppix 3.7, Lunar 1.3, Sorcerer
Posts: 771

Rep: Reputation: 30
Sounds like a config mismatch. The daemon cant seem to find objects in the mysql database. You will need to find the the 'remains' of your previous install and clean it up befire you install again.

At this point, I would startover with mysql install instructions from http://www.mysql.com/documentation/m...tml#Installing

Nothing agains the LAMP URL, but I would follow it ONLY if I know what I'm doing. Standard installations are much easier to cleanup and debug.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. NoviceW Linux - Networking 17 09-17-2014 02:13 PM
ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. suziecorbett Linux - Software 8 10-09-2008 01:52 AM
Starting MySQL OLD Error : imeout error occurred trying to start MySQL Daemon Fr33B5D Linux - Software 9 10-28-2006 06:23 AM
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
Error compiling perl-DBD-MySQL after upgrading to MySQL 4.1 pitaro920 Linux - Software 1 01-16-2006 04:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:00 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
Open Source Consulting | Domain Registration