mysql and mysql.sock

mysql and mysql.sock

Post by mail » Sun, 05 Sep 2004 00:20:46


I have not installed mysql on my own before because I just use
whatever is installed with Linux. I have used Mandrake in the past,
but I am using Debian now. I need to go from mysql version 3.x to 4.x
to use a certain application so I downloaded the binary. After the
appropriate setup, it worked fine sort of, but I started getting an
error regarding mysql.sock, which apparently should be in either /tmp
or /var/run/mysqld/. I cannot find any reference in the mysql
literature regarding how, when or where this file is generated during
the installation/setup process. The only way I get it installed
properly is to use the Debian package installer, but that only
installs mysql version 3.x.

Any hints about mysql.sock and how it is created and ends up in the
appropriate place?

Thanks!

mjl
 
 
 

1. Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) LEOPARD

2. Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) LEOPARD

I got this error starting mysql from installation:
sh-3.2# /usr/local/mysql/bin/mysql -user=mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/mysql/mysql.sock' (2)
The same goes for starting as root.

I do the
sh-3.2# find ~ -name mysql.sock on my home directory,
find . -name mysql.sock in the /usr/local directory and,
find / -name mysql.sock and don't get a response.

I haven't gotten the mysqld started once from the installation.
I removed the other installations.

MY.CONF:
[client]
socket=/var/mysql/mysql.sock

PHP.INI
; Default socket name for local MySQL connects. If empty, uses the
built-in
; MySQL defaults.
mysql.default_socket = /var/mysql/mysql.sock


The entire MY.CONF
[mysqld]
#Path to installation directory. All paths are usually resolved
relative to this.
basedir=/usr/local/mysql-5.1.40-osx10.5-powerpc/bin/
#Path to the database root
datadir=/usr/local/mysql-5.1.40-osx10.5-powerpc/data
#Path to the temporary directory.
tmpdir=/private/tmp
#The size of the buffer used for index blocks. Increase this to get
better index handling (for all reads and multiple writes) to as much
as you can afford; 64M on a 256M machine that mainly runs MySQL is
quite common.
key_buffer_size=8192k
#Each thread that needs to do a sort allocates a buffer of this size.
sort_buffer_size=2M
#If no specific storage engine/table type is defined in an SQL-Create
statement the default type will be used.
default-storage-engine=myisam
[client]
socket=/var/mysql/mysql.sock

Why does it think there are two mysql.sock?
thanks,

3. ERROR#: 2002 can't connect to MySQL server through socket '/var/mysql/mysql.sock'

4. ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

5. Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2) LEOPARD

6. Can't connect '/var/lib/mysql/mysql.sock' (13) - but not the usual suspects

7. Can't connect '/var/lib/mysql/mysql.sock' (13) - but not the usual suspects???

8. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

9. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

10. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

11. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

12. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

13. 2002 Can't connect to local MySQL server through socket '/tmp/mysql.sock'(46)

14. Can't connect to local MySQL server through socket '/tmp/mysql.sock' (46)