[R] dbConnect

Paul Gilbert
Sat, 16 Aug 2008 01:19:20 -0000

Christiane Reuter wrote:
> Hi everybody,
>
> I'm having a problem with connecting to my MySQL database.
> Each time I try to connect
>
> library(RMySQL)
> m <- dbDriver("MySQL")
> con <- dbConnect (m,
host="my_host",username="my_username",
> password="my_password", dbname="name_of_db")
>
> it says
>
> Fehler in mysqlNewConnection(drv, ...) :
>    RS-DBI driver: (could not connect my_host on dbname
"name_of_db"
> Error:Can't connect to MySQL server on 'my_host' (60)
>
> I access the database via https. Might this be the problem?
> (I have an other database that I access via http where I have no
> probelems at all...)
>
If I understand correctly, you are using http to the web server and it
is access MySQL running on the web server machine, which means the
database server is listening for localhost connections. The  dbConnect
is going over the network directly to the server, which means the server
needs to be set up to listen on an network address/port.   If it is not,
you would get tis message, but there are other possible causes too.

Paul
> And if so, is there anyone who knows what I need to do to overcome
> that problem?
>
> Thank you so much!
>
> -Christiane
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
===================================================================================
La version fran?aise suit le texte anglais.

------------------------------------------------------------------------------------

This email may contain privileged and/or confidential in...{{dropped:26}}