4
I am new when the subject is Mysql and installed this program to use with R. I managed to install the Rmysql library, following tutorials I found on the Internet and in the course I am doing in Coursera as
http://biostat.mc.vanderbilt.edu/wiki/Main/RMySQL and
http://www.ahschulz.de/2013/07/23/installing-rmysql-under-windows/
I even tried to install an older second Rmysql library: https://stackoverflow.com/questions/43073782/rmysql-system-error-10060
Using the code:
require(devtools)
install_version("RMySQL", version = "0.10.9", repos = "http://cran.us.r-
project.org")
But none of that worked. When I went to test Mysql, connecting with UCLA Mysql using the following command:
ucscDb <- dbConnect(MySQL(), user="genome", host="genome-mysql.cse.ucsc.edu")
The following error appeared:
Error in .local(drv, ...) :
Failed to connect to database: Error: Lost connection to MySQL server at
'reading authorization packet', system error: 10060
I believe this happened due to problems in installing Mysql. Does anyone have any hint or suggestion?
alastori, thanks for the answer. These steps I had already done and the error persists: Error in . local(drv, ...) : Failed to connect to database: Error: Lost Connection to Mysql server at 'Reading Authorization Packet', system error: 10060 .
– T. Veiga
@T.Veiga try connecting to Mysql using the Mysql Workbench that comes with it.
– Wilson Freitas
You do not need to install Mysql Server in this case. The server is on that side and what you install with the Rmysql package is a Client (driver/Connector). You can do a connection test with another Client, such as Mysql Workbench, as @Wilsonfreitas suggested. If it works, the connectivity is OK and the problem is really in Rmysql. If it does not work with another client, probably some network/connectivity problem. As you saw in my example, I was able to connect normally, so there are no problems with the Mysql Server that is at UCLA.
– alastori
Other people have the same problem and this is like an open Issue on the Github of the Rmysql https://github.com/rstats-db/RMySQL/issues/193 project. In my case it is working and my sessionInfo is this: > sessionInfo() R version 3.4.0 (2017-04-21) Platform: x86_64-W64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Matrix products: default ... Attached base Packages: [1] Stats Graphics grDevices utils datasets methods base Loaded via a namespace (and not Attached): [1] compiler_3.4.0
– alastori