This a draft of my ongoing attempts to solve the issue.
The first steps I suggest are:
Stop the MySQL server
Backup the whole database folder mysql/data
Start the server again
Check the MySQL databases individually for possible errors: mysqlcheck -u root -p some_database_name
You're correct in that the most common way to join two tables is to use a foreign key referencing a primary key. But it is not a requirement. The SQL will work (i.e. will by syntactically correct) for any two columns you wish to use in your JOIN clause, as long as the columns' types can be coerced into something comparable. The question is, will the ...