I am trying to access a dataset using DBI and RMySQL packages for a job test using the following code:
connection <- dbConnect(RMySQL::MySQL(), host = "thcw-test.cntunll4narr.XXXXXX", port = 212XX, user = "thcwXXX", password = "yRNH1WldQZZlOZdo")
However, I keep receiving the following error message:
Error in .local(drv, ...) :
Failed to connect to database: Error: Lost connection to MySQL server at 'handshake: reading initial communication packet', system error: 2
Would anyone kindly help me to resolve this problem? Could you provide a simple explanation for an R-Studio beginner?