Extracting a single database a complete mysql dump file
I recently had to extract a database from a full backup, I only needed one…
It is pretty straightforward to check a MySQL / MariaDB table for a Primary Key, connect to the db server, login or open up your favorite MySQL client.
Without selecting any table, issue the following command:
Where <TABLE> is the name of the table you want to check.
The result returned should have a line show up with the Primary Key.
Note: If the result is empty, that means the table does not have a Primary Key.