Step 1: Import SQL backup:
mysql -u root wp_dump < backup.sql
Step 2: Login:
mysql -u root
Step 3: Use database:
use wp_dump;
Step 4 (optional): Show tables:
show tables;
Step 5 (optional): Show columns in post table:
show columns from wp_posts;
Step 6: Extract title, date and content of all published posts into an external file:
select post_title, post_date, post_content from wp_posts
where post_status like "publish"
into outfile "~/export.txt"
fields terminated by "\n+++++++++++++++++++++++++++++\n"
escaped by "";