Shiny apps based on MySQL data

31 views
Skip to first unread message

Sadaf Naz

unread,
Nov 7, 2016, 6:45:01 PM11/7/16
to shinyapps.io Users
Hi there, 

I've MySQL database in my laptop. I build few apps using data from that database. Locally apps are working but not when I deploy on shiny server.
This is the error: ERROR: Failed to connect to database: Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 

I read many blogs but there is no straight forward answer. 

Is there any way to store my database in shiny server? 

I attached an example code. Any help would be appreciated. Thank you.

Regards,
Sadaf

app.R

Tareef Kawaf

unread,
Nov 7, 2016, 9:08:43 PM11/7/16
to Sadaf Naz, shinyapps.io Users
Hi Sadaf,
We tried to address some of those concepts in the user guide on docs.rstudio.com.
That being said, you will need to have your MySQL database hosted on a server that is accessible from the internet at large. You could run it on a hosted platform if you don't have the infrastructure to support it yourself. Amazon provides such a service (see RDS) but there are others out there as well.

Hope this helps.
Tareef

--
You received this message because you are subscribed to the Google Groups "shinyapps.io Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/234181fb-8c84-4211-8185-6e68ca2a1563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages