What would be the easiest way to take a Outlook pst file and export all of the emails into a MySQL database?
Yikes. Probably the easiest would be to open your PST in Outlook, and use
File->Import and Export, Export to a File, Comma Seperated Values (Windows)
This creates a CSV file, which you can then pull into MySQL via mysqlimport.
If you need more information besides just the contents of the messages, you will need to tap into the store directly through various exotic means.
I don't know the answer, but, if you take a look at Google email uploader (open source), they do the reading part...
I would write an automation client in C# to iterate through the outlook emails, then upload each one to your database. None of this stuff is rocket science. The automation client requires Outlook to be installed and running on the machine. In other words, this approach does not involve just "reading" the PST ; automation implies the Outlook app is actually running and your code is asking the app to open the emails individually. (You need not display all the UI as you do this).
Here's a Q on how to read a PST file by automating outlook using C#. Starting with that, you then need to add the MySQL update stuff, and some good error handling. Be sure to test thoroughly before deleting the files from Outlook. If you choose to not delete, be sure to have a good indexing approach to insure idempotence.
Powershell could be good for this? Eg enum emails in a folder, create sql insert for each, append insert to batch sql script:
$olApp = New-Object -com Outlook.Application
$namespace = $olApp.GetNamespace("MAPI")
$folder = $namespace.GetDefaultFolder(1)
$folder.Items | %{
"insert into MyTable (MyCol1, MyCol2, etc) values ($_.Subject, $_.body, etc)"
} | out-file "outfile.sql" -Append