Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ted Lawless
    @lawlesst
    This can be a place to ask questions about using VIVO with the vivo-vagrant virtual machine.
    Alex Viggio
    @aviggio
    Hi Ted -- nice to find you here :smile:
    Darren Weber
    @darrenleeweber
    Anyone listening?
    Is there a CLI util or simple command for wiping the db?
    Unless it's already documented somewhere, it could be handy to have it in the README.md
    @lawlesst - heads up Ted ...
    Darren Weber
    @darrenleeweber
    The SPARQL UI will not accept a 'DELETE * WHERE { ?s ?p ?o }'
    Ted Lawless
    @lawlesst
    @darrenleeweber this would be good to add to the add to the README.
    The SPARQL UI accepts only read queries - not UPDATE or DELETE.
    Your most direct route is probably to drop the MySQL database and recreate it.
    Another option moving forward is to use named graphs for logical groups of entities - people, publications, organizations - and then just remove or empty the named graph via the UI when you want to. As the named graphs grow in size, though, deletes can be slow.
    Darren Weber
    @darrenleeweber
    Where is the db schema defined in the vagrant installation? If it's a schema.sql file and the MySQL root user and password are available, it should be possible to do this from the ssh command line, right? Would it be necessary to take down the tomcat server/container before and after?
    Ted Lawless
    @lawlesst
    Jena handles creating the DB schema so it's not defined anywhere in the Vagrant installation. I would stop Tomcat, drop the VIVO db, recreate it, and start tomcat.
    Here is the line in the install that creates the db: https://github.com/lawlesst/vivo-vagrant/blob/master/provision/vivo/install.sh#L27
    Darren Weber
    @darrenleeweber
    Great, thanks! If the follow bash script were placed into the 'provision' directory, it could be called with 'vagrant ssh -c "cd; ./provision/reset_vivo_db.sh"' or something like that...
    This message was deleted
    Darren Weber
    @darrenleeweber
    This message was deleted
    cd
    sudo service tomcat7 stop 
    VIVO_DATABASE=$(grep 'VIVO_DATABASE=' provision/vivo/install.sh | sed s/VIVO.*=// )
    mysql -uroot -pvivo -e "DROP DATABASE IF EXISTS $VIVO_DATABASE;"
    mysql -uroot -pvivo -e "CREATE DATABASE $VIVO_DATABASE DEFAULT CHARACTER SET utf8;"
    sudo service tomcat7 start
    Darren Weber
    @darrenleeweber
    Created ticket for this at lawlesst/vivo-vagrant#24
    Ted Lawless
    @lawlesst
    Thanks for the script. I was updating in the process of updating the README but I'l add this to the repo and link to it.