Backup First!

If you want to extract your WordPress Posts from an existing MySQL Database then use this snippet in the SQL Query area for your MySQL Database:-

This will filter out the WordPress posts with their respective Categories and you can then export them in the format that you require (i.e. .sql, .csv, .doc etc).

NB If this isn't working for you then remember that this is using the default Wordpress database prefix of, 'wp_'. Of course for security you shouldn't be using the default Wordpress database prefix, so do a search and replace on 'wp' and enter in your own database prefix. Credit