How do I find out from my database what version of WordPress I need?

Actually, you have a db_version in a “_options” table, also there are information about installed plugins and themes.

  1. With information about dates when website was disrupted you can get back to approximate versions of plugins.
  2. With these assumptions you can recover the most appropriate version of WP where that version of a plugin works correctly or even was released.

I hope you understand what the logic is, and you can continue yourself.