[R] Update RMySQL and ... it's no more running

Gabor Grothendieck ggrothendieck at gmail.com
Fri Feb 19 17:46:40 CET 2010


If you only need it while in R you can use the RENVIRON file or the
.Rprofile or Rprofile.site file.  Use help in R to find more on this.

environment variables can also be set through the control panel.
Google to get instructions.

Another possibility is the free command line Windows utility setenv.exe .

On Fri, Feb 19, 2010 at 9:19 AM, PtitBleu <ptit_bleu at yahoo.fr> wrote:
>
> Hello again,
>
> After 'googling', I set the environment variable MYSQL_HOME value to the
> path to MYSQL with the command below.
> I get a warning (is it a problem or not ???) but I managed to connect to my
> databases.
>
> But when I close and open again R, the connection is lost. I have to run the
> command each time.
> Is there a way to definitively set the variable value ?
>
> Thank in advance,
> Have a nice week-end,
> Ptit Bleu.
>
>
>> Sys.setenv("MYSQL_HOME"="C:/MySQL/MySQL Server 5.1")
>> Sys.getenv('MYSQL_HOME')
>                 MYSQL_HOME
> "C:/MySQL/MySQL Server 5.1"
>
>> library(DBI)
> Warning message:
> le package 'DBI' a été compilé avec la version R 2.9.2
>
>> library(RMySQL)
> Warning messages:
> 1: le package 'RMySQL' a été compilé avec la version R 2.9.2
> 2: In inDL(x, as.logical(local), as.logical(now), ...) :
>
>   RMySQL was compiled with MySQL 5.0.67 but loading MySQL 5.1.44 instead!
>   This may cause problems with your database connections.
>
>   Please install MySQL 5.0.67.
>
>   If you have already done so, you may need to set your environment
>   variable MYSQL_HOME to the proper install directory.



More information about the R-help mailing list