Comments - Can't connect to MariaDB through mysql command line client

8 years, 2 months ago Jan Steinman

ARGH! Why do porters mess with the socket location? Why can't we all just agree to stick it in the same place? And then there's the various clients, all deciding that THEY know the One True Location of the socket?

This caused me days of troubleshooting with the Homebrew port of MariaDB. It was putting in one place, php.ini was looking for it somewhere else, phpMyAdmin was looking for it in yet another place, and it seemed every tool I downloaded looked for it in their own special place -- configurable, of course.

Out of frustration, I made a list of all the likely locations for the socket, and linked them all together. This is working fine... until something else unexpected happens, and the original socket file goes away...

 
8 years, 2 months ago Brian Evans

The mysql client binary is compiled with a default socket location. You can specify this when it is being built.

You may also override the default location in the [client] section of the my.cnf (or my.ini on Windows) so you won't need to specify this on each invocation of the command.

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.