I'm trying to pull data from a cloud MySQL Server. I just moved the database from a shared server to a dedicated cloud server. Everything works fine on the old location. The new location requires an SSH tunnel.
I can successfully connect using the same credentials in both Sequel Pro and MySQL Workbench, but I can't get the R script to play ball.
I can connect to mysql in the command line.
I do not have mysql installed locally.
Here's what's failing:
con <- dbConnect(RMariaDB::MariaDB(), user = 'soundings_app', password = keyringr::decrypt_kc_pw("Soundings_app"), host = '127.0.0.1', port = 3306, dbname='UFO')
I also tried using the actual password as a string, and got the same error.
Error in connection_create(host, username, password, dbname, as.integer(port), : Failed to connect: Can't connect to MySQL server on '127.0.0.1' (57)
My Only Guess
The only thing I can think of is that SequelPro & Workbench both had a place to enter the location of my private key (
I added the host to my ./ssh/config file as follows:
Host XXX.XXX.130.0 LocalForward 3306 localhost:3306
Thanks for any guidance!