Database

You can provide access to MySQL or Postgres database to student by turning the database flag in the Workspace tab of the part configuration. If you want to use GUI tools like MySQL Workbench (for MySQL) or pgAdmin (for Postgres), select Linux tools flag as well in the part configuration. Finally click save part to exit the part panel and use.

If you want to initialize the database, create an SQL file and store it as resource/asnlib/public/init.sql in the teacher view:

PLEASE MAKE SURE INIT.SQL HAS NO ERRORS - THIS WILL PREVENT THE DATABASE FROM LAUNCHING. You can access the database in student view to develop init.sql.

To get the credentials to initialize the database, go to "Student View" from your "Configure Worskpace" page. Select Start Labs to start the database.  

Please wait till the database is Ready. This may take a few seconds (will timeout at 2 minutes in case of error).Then select "Details" tab and there should be a "Database" entry - 

If you select "Show" you will be provided credentials for database - 

Finally to access the DB using GUI tools use Actions -> Applications and select MySQL Workbench or pgAdmin:

More details on how to use the database GUI tools are available on the help section.

Still need help? Contact Us Contact Us