Skip to content

Instantly share code, notes, and snippets.

@powdahound
Created June 10, 2010 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save powdahound/433437 to your computer and use it in GitHub Desktop.
Save powdahound/433437 to your computer and use it in GitHub Desktop.
#!/bin/bash
MYSQL_HOST=graphs.cao0umbvcdjq.us-east-1.rds.amazonaws.com
MYSQL_USER=graphs
MYSQL_PASS=graphs
MYSQL_DB=testdb
MYSQL_CLIENT="mysql -h $MYSQL_HOST -u$MYSQL_USER -p$MYSQL_PASS $MYSQL_DB"
# create table
$MYSQL_CLIENT -e "DROP TABLE names; CREATE TABLE names (
id int(11) unsigned NOT NULL auto_increment,
name varchar(255) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"
for i in {0..500}; do
uuid=`uuidgen`
echo "Write #$i... $uuid"
$MYSQL_CLIENT -e "BEGIN; INSERT INTO names (name) VALUES ('$uuid'); COMMIT;"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment