0

I'm trying to connect to a remote database using RMySQL using SSL, and cannot seem to get it to work. I'm on OSX, R version 3.4.2.

Connecting via mysql on command line works using:

mysql -h host.com --ssl-mode=REQUIRED -u uname -p

But then when I try to connect with RMySQL, I get one of several error messages.

RMySQL::dbConnect(MySQL(), user = "uname", password = "pword", 
                  host = "host.com", dbname = "db") 
Error in .local(drv, ...) : 
  Failed to connect to database: Error: Connections using insecure 
  transport are prohibited while --require_secure_transport=ON.

And

RMySQL::dbConnect(MySQL(), user = "uname", password = "pword", 
                  host = "host.com", dbname = "db", 
                  client.flag = CLIENT_SSL) 
Error in .local(drv, ...) : 
  Failed to connect to database: Error: Bad handshake

Does anyone know what could be going on here?

Alex Gold
  • 335
  • 1
  • 9
  • This may help you https://stackoverflow.com/questions/9738712/connect-to-remote-mysql-server-with-ssl-from-php – RiggsFolly Mar 04 '18 at 16:57
  • @Alex Gold, have you find any solution to this issue. I also have a similar issue https://community.rstudio.com/t/access-mysql-database-from-shinyapps-io-using-require-secure-transport-on/8723 – A. Suliman May 24 '18 at 08:34

0 Answers0