[GRASS-user] MySQL mysql.sock GRASS connection problem
Mark Ruddy
m.ruddy at rhul.ac.uk
Sat Sep 27 19:51:36 EDT 2008
Dear GRASS list,
I am having problems connecting to a local MySQL db from GRASS.
using the following commands i get the error below...
> db.connect driver=mysql database=dbname
> db.login user=user pass=password
> db.tables -p
DBMI-MySQL driver error:
Cannot connect to MySQL: Can't connect to local MySQL server through
socket '/tmp/mysql.sock' (2)
A far as I was aware this is general error to do with some
installations of MySQL placing mysql.sock somewhere else other than /
tmp. I encountered this before when trying to connect another MySQL
client (R) and easily solved the problem by editing the /etc/my.cnf
file to contain the true [client] location of mysql.sock. GRASS
seems to be ignoring the /etc/my.cnf file though and seems to be
still trying to locate mysql.sock in /tmp. All my other MySQL clients
don't have a socket problem. Does GRASS take its MySQL global configs
from some other location? Is something else wrong? Any help would be
greatly appreciated.
I'm running GRASS 6.2.1 courtesy of OpenOSX on Mac OSX 10.4.11 with
MySQL 5.0.19.
Best wishes,
Mark
More information about the grass-user
mailing list