Difference between revisions of "Stacks"
Line 4: | Line 4: | ||
* create database, you must have the appropriate privileges for this. If you do, the command will be something like: | * create database, you must have the appropriate privileges for this. If you do, the command will be something like: | ||
− | echo " | + | echo "CREATE DATABASE <mynewdbname>" | mysql -h <name_of_server_running_mysql> -u <myusername> -p |
* ensure $STACKSROOTDIR/share/stacks/sql/my.cnf is set up properly | * ensure $STACKSROOTDIR/share/stacks/sql/my.cnf is set up properly | ||
Line 12: | Line 12: | ||
* load '''stack.sql''' schema onto the database. It's in $STACKSROOTDIR/share/stacks/sql/stacks.sql, i.e. | * load '''stack.sql''' schema onto the database. It's in $STACKSROOTDIR/share/stacks/sql/stacks.sql, i.e. | ||
mysql <mydbname> -h <name_of_server_running_mysql> -u <myusername> -p < $STACKSROOTDIR/share/stacks/sql/stacks.sql | mysql <mydbname> -h <name_of_server_running_mysql> -u <myusername> -p < $STACKSROOTDIR/share/stacks/sql/stacks.sql | ||
+ | |||
+ | * for whatever reason one can start over by deleting a dtabase too. Care should be taken with a step like this, just in case one deletes the wrong database. The delete command's keyword is in fact "DROP" and woudl be run like this: | ||
+ | echo "DROP DATABASE <mynewdbname>" | mysql -h <name_of_server_running_mysql> -u <myusername> -p |
Revision as of 13:32, 19 April 2016
Dominant Radseq analysis software protocol by Julian Catchen.
Steps
- create database, you must have the appropriate privileges for this. If you do, the command will be something like:
echo "CREATE DATABASE <mynewdbname>" | mysql -h <name_of_server_running_mysql> -u <myusername> -p
- ensure $STACKSROOTDIR/share/stacks/sql/my.cnf is set up properly
- ensure modification privileges for the user
- load stack.sql schema onto the database. It's in $STACKSROOTDIR/share/stacks/sql/stacks.sql, i.e.
mysql <mydbname> -h <name_of_server_running_mysql> -u <myusername> -p < $STACKSROOTDIR/share/stacks/sql/stacks.sql
- for whatever reason one can start over by deleting a dtabase too. Care should be taken with a step like this, just in case one deletes the wrong database. The delete command's keyword is in fact "DROP" and woudl be run like this:
echo "DROP DATABASE <mynewdbname>" | mysql -h <name_of_server_running_mysql> -u <myusername> -p