From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.43) id 1EAbhm-0008TK-VB for garchives@archives.gentoo.org; Wed, 31 Aug 2005 23:09:19 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.4/8.13.4) with SMTP id j7VN661d023579; Wed, 31 Aug 2005 23:06:06 GMT Received: from iriswick.game-host.org (cpe-67-10-244-203.houston.res.rr.com [67.10.244.203]) by robin.gentoo.org (8.13.4/8.13.4) with ESMTP id j7VN20nE021894 for ; Wed, 31 Aug 2005 23:02:00 GMT Received: (qmail 10791 invoked from network); 31 Aug 2005 18:04:37 -0500 Received: from maszypc.maszy.com (HELO ?127.0.0.1?) (192.168.1.125) by galaxy.maszy.com with SMTP; 31 Aug 2005 18:04:37 -0500 Message-ID: <4316376D.10806@iriswick.game-host.org> Date: Wed, 31 Aug 2005 18:04:13 -0500 From: Paul Maszy User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Trouble with mysql References: <1125521529.11373.9.camel@baby.espersunited.com> <43162307.7030701@igoe.me.uk> <1125525169.11368.17.camel@baby.espersunited.com> In-Reply-To: <1125525169.11368.17.camel@baby.espersunited.com> Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Archives-Salt: 23bdd5f2-2cb5-4ac3-b66e-2efe4b104aef X-Archives-Hash: 939f0eb9face7ac64d0c0c9dc69032c5
    You shouldnt have restarted.

    mysql is already starting on boot up. It showing that many mysql daemons is normal and ok.

    # /etc/init.d/mysql stop
--- You will probably get an error here, if everything happened as you said. If not, your done.
 
    kill -9 `ps -ef | grep mysql | awk '{ print $2 }'`
   
    As for connecting to mysql, try without a password
    # mysql -u root


    See if it connects.



    Until you determine what is starting it, dont reboot. It just puts you back to square 1. I think the question you are asking is why is mysql already running. Its gotta be starting in the init scripts somehow, and if its not in /etc/init.d/mysql I would check for other scripts starting it.

    # grep mysql /etc/init.d/*



   

Michael Sullivan wrote:
On Wed, 2005-08-31 at 22:37 +0100, Tim Igoe wrote:
  
Michael Sullivan wrote:
    
I am having trouble with /etc/init.d/mysql.  I rebooted my system, and
when it finished rebooting I tried to connect to the mysql daemon and
failed.  I looked in /var/log/mysql:  There was a file there called
mysql.err.  The contents were:

050831 15:47:29  mysqld started
050831 15:47:30 Can't start server: Bind on TCP/IP port: Address already
in use
050831 15:47:30 Do you already have another mysqld server running on
port: 3306 ?
050831 15:47:30 Aborting

050831 15:47:30 /usr/sbin/mysqld: Shutdown Complete

050831 15:47:30  mysqld ended

      

check the output of ps aux
look for mysqld processes in the list - if it is running then try
killing the mysqld processes or restarting the machine

    
I tried netstat | grep '3306':

bullet mysql # netstat | grep '3306'
bullet mysql #
      
netstat -n | grep 3306

or

netstat | grep mysql

might be better

    
The output was blank, so I assume that port 3306 is NOT in use.  Any
ideas?

      
Do you have something else that could be using the port - a rootkit or
someone else running a service on the box?
    


I did ps aux | grep 'mysqld' and got a listing of several mysqld
processes.  I killed each one using kill -9 and then rebooted the
machine.  Once it was fully rebooted I issued another ps aux | grep
'mysqld'.  Here is the output:

bullet ~ # ps aux | grep 'mysqld'
root      8115  0.0  1.5   2216   948 ?        Ss   11:50
0:00 /bin/sh /usr/bin/mysqld_safe --defaults-file=/etc/mysql/my.cnf
mysql     8151  0.2  3.9  38728  2416 ?        S    11:50
0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
--socket=/var/run/mysqld/mysqld.sock
mysql     8153  0.0  3.9  38728  2420 ?        S    11:50
0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
--socket=/var/run/mysqld/mysqld.sock
mysql     8154  0.0  3.9  38728  2420 ?        S    11:50
0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
--socket=/var/run/mysqld/mysqld.sock
mysql     8155  0.0  3.9  38728  2420 ?        S    11:50
0:00 /usr/sbin/mysqld --defaults-file=/etc/mysql/my.cnf --basedir=/usr
--datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306
--socket=/var/run/mysqld/mysqld.sock
root      8848  0.0  0.8   1448   492 pts/0    S+   11:51   0:00 grep
mysqld
bullet ~ #

I have no idea why so many of them are being started.  How do I stop my
system from starting more than one mysql daemon?

  
-- gentoo-user@gentoo.org mailing list