Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
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 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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