Assign users a random digest time?

This is what I kind of guessed that I would have to do. However, I’m used to shared-server environments where there’s a database server that I can remotely connect to. I’m very good at SQL, but I’m lost as how to connect to the database on a DigitalOcean droplet. Any pointers would be greatly appreciated.