Skip to content

Instantly share code, notes, and snippets.

@glappen
Created September 24, 2014 00:20
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 glappen/71cebdf8b46260a80c41 to your computer and use it in GitHub Desktop.
Save glappen/71cebdf8b46260a80c41 to your computer and use it in GitHub Desktop.
if [ `ps ax | grep mysqld_safe | grep -v grep | wc -l` -eq 0 ]; then mysql.server start; sleep 1; fi
export GOPATH=/Users/greg/LapComInc/Timegen/Surlei/surlei/go && go run go/src/surlei/scripts/0-DropDatabase.go
Drop surleidata1
Drop surleilookup1
export GOPATH=/Users/greg/LapComInc/Timegen/Surlei/surlei/go && go run go/src/surlei/scripts/1-CreateDatabase.go
Create surleidata1
Create surleilookup1
export GOPATH=/Users/greg/LapComInc/Timegen/Surlei/surlei/go && go run go/src/surlei/scripts/2-CreateRootSuperUser.go
2014/09/23 20:19:30 Connecting DB shardset surleidata on localhost
panic: Error 1049: Unknown database 'surleidata2'
goroutine 16 [running]:
runtime.panic(0x23fc40, 0xc208000af0)
/usr/local/Cellar/go/1.3.1/libexec/src/pkg/runtime/panic.c:279 +0xf5
surlei/data.ConnectDb(0x551748, 0x4a7400)
/Users/greg/LapComInc/Timegen/Surlei/surlei/go/src/surlei/data/db.go:28 +0x408
main.main()
/Users/greg/LapComInc/Timegen/Surlei/surlei/go/src/surlei/scripts/2-CreateRootSuperUser.go:15 +0x52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment