Every droplet I have ever created with an install of Wordpress will eventually crash MySQL, unless I take certain steps.
Mostly, what happens is that Wordpress is barraged with bots trying to login or gain access to your Wordpress account.
A few steps will diminish these attacks to rarely if ever crash MySQL:
- Install the plugin Login-lockdown
- Change your Wordpress Login Page (you will need to Google for that, as there is several ways to go about it) basically you are moving your Wordpress login page from wp-login.php to something else (for example mypersonalogin.php)
- set up swap (as mentioned in previous answers
- use 6G firewall in your .htaccess https://perishablepress.com/6g/
Lastly, I created a script that will check on MySQL and Apache and restart them if needed:
Those things will not completely stop all bots or attacks on your Wordpress site, but they will stop the mindless bots that are searching for basic/common installs of Wordpress, which will make MySQL crash.
For fun, once you install Login-Lockdown, wait for a bit and then view the logs (under settings in Wordpress) and you will see all of the attempts that have been made to access your site. You can see all of the common names and passwords that the bots use to try and login with.