SQL Connection Database with RStudio
I started a new project ==> Data visualization
on Rstudio
. My data to the server phpMyAdmin
(SQL Database)
. I will only use 4 tables. So in this case, I have to make a link between my database and Rstudio. I found this question on Stackoverflow
enter link description here
I tried this solution, I started with the installation package mySQL
, but it returned an error:
package βmysqlβ is not available (for R version 3.2.2
)
Knowing what I'm working on PalantirCloud
.
Could you please give me a suggestion how can I solve this problem? Thank.
source to share
1st grand ALL PRIVILEGES
remote MySQL server for a specific user (database).
Then run these commands in Rstudio
install.packages("RMySQL")
library("RMySQL")
mydb = dbConnect(MySQL(),user='root',password='query',dbname='bd_test', host='192.X.X.X')
Where -
User = Remote MySQL database username Password = Remote MySQL database user password dbname = Remote database name And Host = The Remote server URL/IP address
source to share