Cannot access a dataset: Failed to connect to database: Error: Lost connection to MySQL server at

Hi,

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?

Thanks :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.