d53b34e403
darcs-hash:20080922195824-5ed1f-f95ae048209e44e4de7698d98eb8a01121a2231d.gz
15 lines
360 B
Bash
Executable File
15 lines
360 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export user=$1
|
|
export password=$2
|
|
export DB=$3
|
|
export SCR=$4
|
|
|
|
mysqldump -u $user --password=$password -c -t --hex-blob $DB > /tmp/$DB.sql
|
|
mysqladmin -u $user --password=$password -f drop $DB
|
|
mysqladmin -u $user --password=$password create $DB
|
|
mysql -u $user --password=$password $DB < $SCR
|
|
mysql -u $user --password=$password $DB < /tmp/$DB.sql
|
|
|
|
|