Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why would this: ./mysqladmin versio

Status
Not open for further replies.

frozenpeas

Technical User
Sep 13, 2001
893
CA
Why would this: ./mysqladmin version

give this error:

Code:
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!
 
I did, then I checked the error log. I got this (scout is my hostname):

Code:
020609 14:56:01  mysqld started
020609 14:56:02  /usr/local/libexec/mysqld: Can't create/write to file '/usr/local/var/scout.pid' (Errcode: 13)
020609 14:56:02  /usr/local/libexec/mysqld: Can't find file: './mysql/host.frm' (errno: 13)
020609 14:56:02  /usr/local/libexec/mysqld: Error on delete of '/usr/local/var/scout.pid' (Errcode: 2)
020609 14:56:02  mysqld ended

Any idea where I should go from here? Thanks.
 
I'm looking at it. I've done the mysql_install_db stuff before. Here is what I am getting now (when trying to set my root password):

Code:
./mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists!

Is MySQL always this hard to get working or do I just have good luck?

Thanks.
 
You're lucky, but don't feel special. This problem crops up from time-to-time.

Try putting mysql.sock somewhere besides /tmp. This is set in your my.cnf file. You may have to create a directory owned by the user mysql runs as, and put it there.

 
check the permissions on this '/tmp/mysql.sock'
/tmp should be rwxrwxrwx (chmod -r 777) [possibly you will need -R instead) recursice change of permissions on /tmp will allow you permission to login to mysql. ***************************************
Party on, dudes!
[cannon]
 
If you are going to keep mysql.sock in /tmp, make sure that your machine does not have some kind of cronjob that cleans up old files in the /tmp directory. Use of mysql.sock to communicate with MySQL does not update the timedate stamp on the file, and your cleaning app might just delete it for you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top