1

I would like to use Mysql in QGIS. But when I want to create a new connection to the database (Add Vector Layer), I can't connect because QGIS is looking for

/tmp/mysql.sock

But I'm using XAMPP for Mac OS X so the socket is in

/Applications/XAMPP/xamppfiles/var/mysql/

Is there a way to change the path to the mysql socket in QGIS ?

Thank you.

  • Is Qgis actually using the local socket directly? My MySQL connection dialog only has host/port/user/pass settings and so for a local DB it would go via loopback network on 'localhost'... Qgis 1.7.4, maybe local socket connections are a new thing... – Spacedman Sep 21 '12 at 10:07
  • @Spacedman Yes, it's using it directly, I only specified localhost and when I try to connect, It says that the socket /tmp/mysql.sock couldn't be accessed (normal, because it doesn't exist :)) – Julien Fouilhé Sep 21 '12 at 10:18
1

I'm currently solving my problem using a simple:

ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /tmp/mysql.sock

I know that's not a clean solution but it's the easier I found.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.