Specify socket location

[expired user #2841]'s profile image [expired user #2841] posted 16 years ago in General Permalink
I have searched the forum for the answer to this question but failed to find it. I'll apologize now if this has been posted before.

I need to connect to a database that has mysql.socket in a location other than default.

How do I specify the location of the mysql.socket file when connecting with HeidiSQL?

Thanks in advance for any information.
[expired user #9069]'s profile image [expired user #9069] posted 9 years ago Permalink
I have the same problem - is there already a solution?

there is also this ticket: http://sourceforge.net/p/heidisql/tickets/2961/

I want to connect to a DB on an 1&1 Managed Server
it is possible to connect to mysql via SSH but you have to specify a socket

mysql --host=localhost --user=dbo123456789 --password=******** -S /tmp/mysql5.sock db123456789


https://hilfe-center.1und1.de/hosting/server-c10082640/dedicated-server-managed-c10082667/skripte-und-datenbanken-c10085267/via-ssh-auf-managed-server-mit-mysql-datenbank-verbinden-a10790059.html
ansgar's profile image ansgar posted 9 years ago Permalink
This thread is 8 years old. At that time, HeidiSQL really did not support sockets, which it does since several years now. But only for direct connections, not for SSH tunnels.

Would it be sufficient to use the dot "." as hostname and the text specified in the "Host" field as socket in such cases? This is at least what the "MySQL named pipe" network types do.
[expired user #9069]'s profile image [expired user #9069] posted 9 years ago Permalink
thank you for the fast answer!

the recommended hostname for the 1und1 DB with socket is: localhost:/tmp/mysql5.sock

perhaps that helps?

you cold split by the colon ":" and pass the second part as the socket?
ansgar's profile image ansgar posted 9 years ago Permalink
Up to now I thought the hostname is superfluous when passing a socket, as the hostname is always localhost then. Or as said above, the dot, which may be the same or not. If that's the case, HeidiSQL just needs another network type called "SSH tunnel using named pipes". The host input then changes to a "socket" input, and internally Heidi knows it has to use the dot or localhost as host name.
[expired user #9069]'s profile image [expired user #9069] posted 9 years ago Permalink
ah ok. sounds good to me!

as long as heidiSQL uses the above call to connect to mysql with a Socket (-S .....) it should work.
ansgar's profile image ansgar posted 9 years ago Permalink
There is no call to mysql - it's an API call to mysql_real_connect. But it's basically the same.
[expired user #9120]'s profile image [expired user #9120] posted 9 years ago Permalink
How are things going on this topic?
I have the same problem with 1and1 managed servers.
is there an aproximated time for when this feature will be ready?
Best wishes from Spain

Please login to leave a reply, or register at first.