This shows you the differences between two versions of the page.

Link to this comparison view

nlp-private:ccash-database-setup [2015/04/22 20:55] (current)
ryancha created
Line 1: Line 1:
 +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 cash.cs.byu.edu 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 cash.cs.byu.edu===
 +''​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:
 +*:<​code><​property name="​connection.url">​jdbc:​mysql://​localhost:​3306/​ccash</​property></​code>​
 +** Uncomment the line:
 +*:<​code><​property name="​connection.url">​jdbc:​mysql://​cash.cs.byu.edu:​3306/​ccash</​property></​code>​
 +===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.
 +# Install mysql and have it running (platform dependent)
 +#:(if you don't have admin privileges, see how-to/​install_mysql_in_userpace.txt).
 +# Create a ccash user
 +#: <​code>​ create user ccash;</​code>​
 +# Grant proper permissions
 +#: <​code>​GRANT ALL on ccash.* to '​ccash'​@'​localhost';​ </​code>​
 +====Populate your database====
 +# cd into the tools/ directory to have access to the createDatabase.sql file.
 +# Type into the shell 
 +#:<​code>​mysql -u ccash < createDatabase.sql</​code>​
 +#* 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. ​
 +#''​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 20:55 by ryancha
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = 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