HOWTO Install CCDB on your local machine

From GlueXWiki
Jump to: navigation, search
  • install the MariaDB server
    • there are lots of guides on how to do this on the internet, it will vary from distribution to distribution
  • create a user on the database with username = ccdb
    • mysql -h localhost -u root
      • create user ccdb_user@localhost;
      • grant all on ccdb.* to 'ccdb_user'@localhost;
  • create the ccdb database on the local server
    • mysql -h localhost -uccdb_user
      • create database ccdb;
  • dump the ccdb into a local file
    • mysqldump -h hallddb.jlab.org -u ccdb_user ccdb > ./ccdb_dump.sql
    • this will take a minute or two or...
  • Load the dump on to your local MariaDB server
    • mysql -h localhost -u ccdb_user ccdb < ./ccdb_dump.sql
    • this will take a minute or two
  • Define your CCDB_CONNECTION variable
    • export CCDB_CONNECTION mysql://ccdb_user@localhost/ccdb
  • Browse the database (assuming the ccdb command is in your path)
    • ccdb -i
      • ls
  • If that works, you are done.