Access MySQL database in R studio

I want to access the database in MySQL but i am getting the following error:

can't connect to mysql server through socket /var/run/mysqld/mysqld.sock.

How do i solve this?

Can you please be more specific? What is the code you are using to connect to that particular MySQL server and where the server is hosted?

This is the code i tried but it keeps returning that error message

connection <- dbConnect(
drv = MariaDB(),
dbname = database,
user = user,
password = password,
host = host,
port = port
)

Do i need to do something with MySQL workbench?

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.