summaryrefslogtreecommitdiff
path: root/scripts/make-empty-db
blob: 59d2c21fe4ecc56ee8667c76aea6749a6e22dc02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

export SCRIPTDIR=/home/lvw/Development/muggle-plugin/scripts
cd $SCRIPTDIR

echo "creating db"
mysql -u root < createdb.mysql
 
echo "creating tables"
mysql -u root < $SCRIPTDIR/createtables.mysql

echo "reading genres"
echo " use GiantDisc; load data local infile '$SCRIPTDIR/genres.txt' into table genre;"| mysql -u root --local-infile=1 

echo "reading languages"
echo "use GiantDisc; load data local infile '$SCRIPTDIR/languages.txt' into table language;" | mysql -u root --local-infile=1

echo "reading musictypes"
echo "use GiantDisc; load data local infile '$SCRIPTDIR/musictypes.txt' into table language;" | mysql -u root --local-infile=1

echo "reading sources"
echo "use GiantDisc; load data local infile '$SCRIPTDIR/sources.txt' into table language;" | mysql -u root --local-infile=1