On Wed, 2005-08-31 at 17:20 -0400, Eric Crossman wrote:
> On Wed, 2005-08-31 at 15:52 -0500, 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
> > 
> > 
> > I tried netstat | grep '3306':
> > 
> > bullet mysql # netstat | grep '3306'
> > bullet mysql #
> > 
> > The output was blank, so I assume that port 3306 is NOT in use.  Any
> > ideas?
> > 
> 
> Try netstat -an | grep 3306. The "-n" option forces netstat to show port
> numbers and not translate them to familiar names. The "-p" option is
> also useful to determine what program has opened the port.
> 
> Eric

I ran netstat with -an grepping for port 3306.  It found it:

bullet ~ # netstat -an | grep 3306
tcp        0      0 127.0.0.1:3306          0.0.0.0:*
LISTEN


so I grepp'd netstat for mysql:

bullet ~ # netstat | grep 'mysql'
unix  3      [ ]         STREAM     CONNECTING
0      /var/run/mysqld/mysqld.sock

It was running, so I tried using the mysql client:

bullet ~ # mysql -u root -p
Enter password:
ERROR 2002: Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
bullet ~ #

I don't understand this...


-- 
gentoo-user@gentoo.org mailing list

Reply via email to