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