Connect to MySQL database with RMySQL

久未见 提交于 2019-11-30 03:46:34

That is most likely a setup issue on the server side. Make sure that networked access is enabled.

Also, a local test with the command-line client is not equivalent as that typically uses sockets. The mysql server logs may be helpful.

First try to connect to MySQL server using MySQL Workbench or command line mysql using the same parameter. If it connects then R should also be able to connect.

Typically this issue comes when MySQL server doesn't allow connections from remote machines.

As people have told you, you can try to connect to the host with other application as mysql workbench. How odd! When I have tried in RStudio to connect to my db with your code without indicate the host in the command I haven't been able to connect.

I have needed to indicate the host ( host = 'localhost' ) in the command.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!