Skip to content
Prev 713 / 1559 Next

RMySQL dbConnect( default.file="mysql.config" ) fails

I can connect to a database using

 	dbConnect(m, dbname="intSites",user="3y996DKX7i",password="pass")

but when I try using

 	dbConnect(m, default.file="mysql.config")

and similar calls I get an error: RS-DBI driver: (Failed to connect to 
database ...

Details follow. Please forgive a few line wraps. Help appreciated.

Chuck

---
[1] "# config for intsite queries" ""
  [3] "[client]"                     "user = 3y996DKX7i"
  [5] "password = pass "             "host = localhost"
  [7] ""                             "[rs-dbi]"
  [9] "database = intSites"          ""
Loading required package: DBI
<MySQLDriver:(82181)>
   Driver name:  MySQL
   Max  connections: 16
   Conn. processed: 0
   Default records per fetch: 500
   Open connections: 0
<MySQLConnection:(82181,0)>
   User: 3y996DKX7i
   Host: localhost
   Dbname: intSites
   Connection type: Localhost via UNIX socket
   No resultSet available
Error in mysqlNewConnection(drv, ...) :
   RS-DBI driver: (Failed to connect to database: Error: Can't connect to 
local MySQL server through socket '/tm\
p/mysql.sock' (2)
)
Error in mysqlNewConnection(drv, ...) :
   RS-DBI driver: (Failed to connect to database: Error: Can't connect to 
local MySQL server through socket '/tm\
p/mysql.sock' (2)
)
Error in mysqlNewConnection(drv, ...) :
   RS-DBI driver: (Failed to connect to database: Error: Can't connect to 
local MySQL server through socket '/tm\
p/mysql.sock' (2)
)
R version 2.9.0 (2009-04-17)
i386-apple-darwin8.11.1

locale:
C


attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RMySQL_0.7-4 DBI_0.2-4
Charles C. Berry                            (858) 534-2098
                                             Dept of Family/Preventive Medicine
E mailto:cberry at tajo.ucsd.edu	            UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901