Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Prof Brian Ripley
It is trivial with RODBC (I know that is not what you asked, but it is the solution we found first). For RMySQL, note first that the MySQL configuration file is consulted, so the default host is specified in the client section, which is like [client] port=3306 [mysql]

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
Indeed, I noticed the host argument but the server demands an username and a password for the machine first, and only after that for the MySQL server. Those were the arguments I was looking for. I will study the RODBC package then, if it solves the problem. Thank you very much, Adrian On

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Prof Brian Ripley
On Sat, 15 Dec 2007, Adrian Dusa wrote: Indeed, I noticed the host argument but the server demands an username and a password for the machine first, But you said 'connect to', not 'log in to', so how were we to know that? and only after that for the MySQL server. Those were the arguments I

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Gabor Grothendieck
Use ssh forwarding to forward local port 3307 to remote port 3306 specifying the remote account and password. Then if you use local port 3306 you can access your local version of MySQL and if you use port 3307 you can access the remote version. There is some info on the MySQL site. First test

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
On Saturday 15 December 2007, Prof Brian Ripley wrote: On Sat, 15 Dec 2007, Adrian Dusa wrote: Indeed, I noticed the host argument but the server demands an username and a password for the machine first, But you said 'connect to', not 'log in to', so how were we to know that? and only

Re: [R] connecting RMySQL to and external server

2007-12-15 Thread Adrian Dusa
On Saturday 15 December 2007, you wrote: Use ssh forwarding to forward local port 3307 to remote port 3306 specifying the remote account and password.  Then if you use local port 3306 you can access your local version of MySQL and if you use port 3307 you can access the remote version.   There

[R] connecting RMySQL to and external server

2007-12-14 Thread Adrian Dusa
Dear list, I learned how to connect R to a local MySQL server, using: drv - dbDriver(MySQL) con - dbConnect(drv, user=root, password=mypass, dbname=mydb) Is it possible to connect R in this way to an external server (on a different machine, with a different IP)? I read the documentation on