Skip to content

Instantly share code, notes, and snippets.

@postnati
Created May 27, 2011 15:17
Show Gist options
  • Save postnati/995457 to your computer and use it in GitHub Desktop.
Save postnati/995457 to your computer and use it in GitHub Desktop.
Database setup for MySQL CSV creation examples
mysql --user=root --password='' -e 'DROP DATABASE phineas_and_ferb;'
mysql --user=root --password='' -e 'CREATE DATABASE phineas_and_ferb;'
mysql --user=root --password='' phineas_and_ferb -e 'CREATE TABLE characters (id INT, name VARCHAR(100), bio VARCHAR(100));'
mysql --user=root --password='' phineas_and_ferb -e 'INSERT INTO characters VALUES (1, "Phineas", "Thinking up ways to squeeze more fun out of every summer day helps Phineas stay entertained.");'
mysql --user=root --password='' phineas_and_ferb -e 'INSERT INTO characters VALUES (2, "Ferb", "Ferb is the brains behind the gadgets and contraptions.");'
mysql --user=root --password='' phineas_and_ferb -e 'INSERT INTO characters VALUES (3, "Perry the Platypus", "This pet platypus hides a secret life as crime-fighting agent P!");'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment