On Tue, 28 Mar 2006, Áquila Chaves wrote: > To: mysql@lists.mysql.com > From: Áquila Chaves <[EMAIL PROTECTED]> > Subject: error: 'Can't connect to local MySQL server through socket > '/tmp/mysql.sock' > > - When I execute the command "mysqld_safe": > [EMAIL PROTECTED] mysql]# bin/mysqld_safe --user=mysql & > [1] 7298 [EMAIL PROTECTED] mysql]# Starting mysqld daemon > with databases from /var/lib/mysql /* {processing... > the cursor is blinking but I don't have any answer... > So, I press <ENTER>} */ [EMAIL PROTECTED] mysql]# > > - The log message is: > 060323 16:51:11 mysqld started > 060323 16:51:11 InnoDB: Started; log sequence number 0 43655 > 060323 16:51:11 [Note] /usr/local/mysql/bin/mysqld: ready for > connections. > Version: '5.0.19-standard' socket: '/var/lib/mysql/mysql.sock' port: > 3306 MySQL Community Edition - Standard (GPL)
So you have got mysqld running OK, and waiting for you to connect to it on the socket /var/lib/mysql/mysql.sock > - Aparently it's OK. But when I execute the command below > occurs the following error: [EMAIL PROTECTED] mysql]# > bin/mysqladmin version bin/mysqladmin: connect to > server at 'localhost' failed error: 'Can't connect to > local MySQL server through socket '/tmp/mysql.sock' > (2)' Check that mysqld is running and that the socket: > '/tmp/mysql.sock' exists! You are trying to connect to the mysql server on a different socket than the one mysqld is listening on for connections. You need to tell mysqladmin to connect to the socket that mysqld is listening to. In this case it is /var/lib/mysql/mysql.sock. You could do this with: /bin/mysqladmin --socket=/var/lib/mysql/mysql.sock That should work. If you have set a password you will need to use that as well. You could also set the --socket value in /etc/my.cnf by adding a few lines to it like this: Note that directives in the my.cnf file are the same as on the command-line, but without the preceeding -- double-dash. # /etc/my.cnf # # The following options will be passed to all MySQL clients [client] socket = /var/lib/mysql/mysql.sock port = 3306 HTH Keith
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]