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

does not find mysql.sock (only looks inside /tmp) #12

Closed
grosser opened this issue Feb 15, 2011 · 5 comments
Closed

does not find mysql.sock (only looks inside /tmp) #12

grosser opened this issue Feb 15, 2011 · 5 comments

Comments

@grosser
Copy link

grosser commented Feb 15, 2011

having it working out of the box on ubuntu would be great

@tmtm
Copy link
Owner

tmtm commented Feb 16, 2011

Use MYSQL_UNIX_PORT environment variable.

For Ubuntu:

export MYSQL_UNIX_PORT=/var/run/mysqld/mysqld.sock

@grosser
Copy link
Author

grosser commented Feb 17, 2011

Thanks for the reply, but having it working out of the box would be very nice, just add something like socket = /var/run/mysqld/mysqld.sock if os =~ /Ubuntu/

@tmtm
Copy link
Owner

tmtm commented Feb 17, 2011

To automatically determine the location of the socket file is not possible.
If you know the socket file path, change MYSQL_UNIX_PORT in mysql.rb.

@grosser
Copy link
Author

grosser commented Feb 17, 2011

if its not possible why does it work in the normal mysql ?
detect os -> guess default <-> overwritten by MYSQL_UNIX_PORT

@tmtm
Copy link
Owner

tmtm commented Feb 18, 2011

On Ubuntu, if you use mysql deb package, default path of socket file is /var/run/mysqld/mysqld.sock. If you use mysql binary tarball from mysql.com, it is /tmp/mysql.sock.
In either case, socket file path is changable by mysqld --socket option.
So, the socket file path is not determined by the OS.

This issue was closed.
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

2 participants