diff options
Diffstat (limited to 'scripts/make-empty-db')
| -rwxr-xr-x | scripts/make-empty-db | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/make-empty-db b/scripts/make-empty-db new file mode 100755 index 0000000..92ccf75 --- /dev/null +++ b/scripts/make-empty-db @@ -0,0 +1,19 @@ +#!/bin/sh + +echo "creating db" +mysql -u root < createdb.mysql + +echo "creating tables" +mysql -u root < createtables.mysql + +echo "reading genres" +echo " use GiantDisc; load data local infile 'genres.txt' into table genre;"| mysql -u root --local-infile=1 + +echo "reading languages" +echo "use GiantDisc; load data local infile 'languages.txt' into table language;" | mysql -u root --local-infile=1 + +echo "reading musictypes" +echo "use GiantDisc; load data local infile 'musictypes.txt' into table musictype;" | mysql -u root --local-infile=1 + +echo "reading sources" +echo "use GiantDisc; load data local infile 'sources.txt' into table source;" | mysql -u root --local-infile=1 |
