Exporting a Database Schema in MySQL

File this under “Useful things to remember”.

The following bit of command line magic will export the schema of your database.

mysqldump –no-data –tables -u YOUR_USER_NAME -p DATABASE_YOU_WANT_SCRIPTED >> FILENAME.sql

An example looks like this:

mysqldump –no-data –tables -u larry -p contacts >> contacts.sql

If you want the data as well, omit the “–no-data” portion.

Backpack API

The Backpack web service has been available for a few short hours, and already O’Reilly has started using it on their Radar Blog. They’ve devised a nifty way of tying together content on their public backpack pages, with the Amazon API in order to produce their books page. This reminds me a lot of shell scripting on a *nix system, tying together applications to build something new.

Very cool stuff.