I am trying to connect to SQL database located in the same directory as in my app.R file but I get the following error if I try to connect.
con <- dbConnect(RMySQL::MySQL(), dbname = "super_data") Error in .local(drv, ...) : Failed to connect to database: Error: Can't connect to MySQL server on 'localhost' (0)
mydb = dbConnect(MySQL(), user='root', password='', dbname='super_data.sql', host='localhost') Error in .local(drv, ...) : Failed to connect to database: Error: Can't connect to MySQL server on 'localhost' (0)