My database was lost due to an error in server settings. After digging through the internet, I found plenty of discussions about .frm and .ibd files.
The .frm file stores an InnoDB table’s structure, while the .ibd file holds the raw table data. The .ibd on its own can’t be used directly as a database, so the structure has to be rebuilt first.
There are many ways to restore from these files. The simplest one I found can restore many tables at once with a short Python script and a tool called mysqlfrm from the MySQL Utilities archive.
The idea: locate the .frm / .ibd files (for me under /var/lib/mysql/<database> on CentOS 7), copy them to a working folder, install and run a local MySQL server, then loop over every .frm and pipe mysqlfrm’s output into a clean .sql file per table.
The full script and step-by-step instructions live in the repository linked above.