The following instructions on how to setup the CCASH client for development may also be found in the Ccash project under docs/how-to. Edits here should be refelected back to the project.

Setting Up The Database

Ccash uses Hibernate to interface with a database server on the backend, which allows data to be persistent. In order to run Ccash, you need to point it either to a local database (one you've set up on your own machine), or else to a remote one. For your convenience, we have set up a mysql server at which can be accessed from on BYU campus. This will probably be available until we actually deploy Ccash in the wild, at which time we'll have to make that server unavailable for development. Or, if you want faster access and more control, install and set up your own local database.

Using the MySql server at

This is available only if you are developing on campus (BYU firewalls block all incoming requests on 3306).

  • Edit src/hibernate.cfg.xml:
    • Comment out the line:
  • :
    <property name="connection.url">jdbc:mysql://localhost:3306/ccash</property>
    • Uncomment the line:
  • :
    <property name="connection.url">jdbc:mysql://</property>

Setting up your own local installation of mysql

Create your database and user

These instructions assume you want to create a database named “ccash” and a user named “ccash” with no password and all privileges in the database “ccash”. This obviously is not particularly secure. It's for development. If you want to customize your installation, feel free. You'll need to adjust the settings in src/hibernate.cfg.xml. Just make sure you don't commit your changes back to the project svn repository.

  1. Install mysql and have it running (platform dependent)
  2. :(if you don't have admin privileges, see how-to/install_mysql_in_userpace.txt).
  3. Create a ccash user
  4. :
     create user ccash;
  5. Grant proper permissions
  6. :
    GRANT ALL on ccash.* to 'ccash'@'localhost'; 

    ====Populate your database====

  7. cd into the tools/ directory to have access to the createDatabase.sql file.
  8. Type into the shell
  9. :
    mysql -u ccash < createDatabase.sql
    • This will log you into mysql and run the sql commands contained in the text file as if you actually typed them into the mysql window.
  10. Optional: Now you should be able to log in as your user (`mysql -u ccash`) and type `USE ccash;` and then explore newly created tables to your hearts content.(ie `SHOW tables;`)
nlp-private/ccash-database-setup.txt · Last modified: 2015/04/22 14:55 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0