Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the default socket path distribution-specific #794

Closed
gfrlv opened this issue Nov 3, 2019 · 0 comments
Closed

Make the default socket path distribution-specific #794

gfrlv opened this issue Nov 3, 2019 · 0 comments

Comments

@gfrlv
Copy link
Member

gfrlv commented Nov 3, 2019

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

@gfrlv gfrlv mentioned this issue Nov 4, 2019
2 tasks
@gfrlv gfrlv closed this as completed Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant