how to insert missing tags into the posts through mySQL?

You should not modify the wordpress DB via SQL unless it is a total emergency. WordPress DB structure getting more complex with time and there are always possible intractions with plugins that you might bypass with direct SQL.

What you should do is to write a small plugin that inserts the tags by calling using the relevant APIs.