-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature 335 seeps column names (#340)
* Added latest SEEPS data to the point_stat directory * Updated extension from .txt to .stat to METdbLoad will recognize the files * Issue #335 update column names for SEEPS data updates * Issue #335 changed names of SEEPS columns to reflect changes in MET * Issue #335 add test for the changed SEEPS columns * script that generates DB commands used to create and drop the database
- Loading branch information
Showing
5 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/bash | ||
|
||
|
||
echo "" | ||
echo "" | ||
echo "" | ||
echo "*****************" | ||
echo " USAGE" | ||
echo "*****************" | ||
echo "" | ||
echo " ***Run under BASH shell***" | ||
echo " SET the following ENV variables: " | ||
echo " DB_PWD - the password for the mvadmin user" | ||
echo " DBNAME - the name of the database you wish to create/drop/load schema" | ||
echo " MVSCHEMA - the full path and name of the mv_mysql.sql script to load the schema" | ||
echo " Then copy and paste the appropriate command for dropping, creating, or loading the schema after running the following on the command line:" | ||
echo "" | ||
echo " bash db_cmd.bash " | ||
echo "" | ||
echo "*****************" | ||
echo "" | ||
echo "" | ||
echo "" | ||
|
||
echo "" | ||
echo "********" | ||
echo "Command to drop database ${DBNAME} if it exists (or error message if it doesn't exist)..." | ||
echo "********" | ||
echo mysql -u mvadmin -p${DB_PWD} "'drop database" ${DBNAME}"';" | ||
|
||
|
||
echo "" | ||
echo "********" | ||
echo "Command to create database ${DBNAME}..." | ||
echo "********" | ||
echo mysql -u mvadmin -p${DB_PWD} -e "'"create database ${DBNAME}"'"; | ||
|
||
echo "" | ||
echo "********" | ||
echo "Command to grant privileges to ${DBNAME}..." | ||
echo "********" | ||
echo mysql -u mvadmin -p${DB_PWD} -e "\""GRANT INSERT, DELETE, UPDATE, INDEX, DROP ON ${DBNAME}.* to "'"mvuser"'"@"'"%"'" "\"" | ||
echo "" | ||
|
||
|
||
echo "" | ||
echo "********" | ||
echo "Command to load mv_mysql.sql schema ${DBNAME}..." | ||
echo "********" | ||
echo mysql -u mvadmin -p${DB_PWD} ${DBNAME} "<" ${MVSCHEMA} | ||
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters