-
Notifications
You must be signed in to change notification settings - Fork 683
Closed
Description
When the socket path is not specified in my.cnf, we try the hardcoded value /var/run/mysqld/mysqld.sock. However, this is not a universal constant: the docs specify /tmp/mysql.sock as the default location, and in different distribution packages of mysql it is variously overriden. Here is an old blog post where someone collected the following default paths:
| OS | socket location |
|---|---|
| Non-Linux e.g. FreeBSD or Solaris | /tmp/mysql.sock |
| Debian-based e.g. Ubuntu, and archlinux | /var/run/mysqld/mysqld.sock |
| SUSE (after v11.2) | /var/run/mysql/mysql.sock |
| Red Hat, and SUSE (before v11.2) | /var/lib/mysql/mysql.sock |
| archlinux (very old versions) | /tmp/mysqld.sock |
I suggest putting the default socket location into the .myclirc file. In theory, it would then be a package maintainer's job to specify the correct path for each distribution, but since many distribution packages are not maintained, we could probably do some guesswork in setup.py
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels