Saw someone on Twitter need this, so I whipped something up pretty quick. It’s not pretty, but it gets the job done.
You run it with:
ruby adif_to_sql.rb [ADIF_FILENAME] [MYSQL_TABLENAME]
You just specify the ADIF file and the name of the MySQL table name. The script creates an SQL file that can be imported directly into MySQL.
Get the script here: http://www.kritikal.com/ham/adif_to_sql.rb