Grails MySQL Tutorial

Grails is a development framework that leverages the Ruby on Rails development framework and also allows developers to use Java programming technologies. It can be viewed as a port of Ruby on Rails to the Java development platform. Like applications developed in Ruby on Rails, Grails applications can be hooked into the open source database platform MySQL. If Grails is paired with the Groovy framework, developers can program in Java and create the same kinds of self-generating code applications that Ruby on Rails developers can put together.

Instructions

    • 1

      Launch a terminal command line connection to the web server or development environment which will be hosting the Grails MySQL database and log in to the server using a login that has administrative credentials.

    • 2

      Create a Grails development environment variable by typing the following command:

      GRAILS_HOME

    • 3

      Enter the following command to add a MySQL database path to the application, which will prompt MySQL to automatically install itself for use in the Grails application:

      $GRAILS_HOME/bin

    • 4

      Type the following command to check that you are working with the correct version of Grails and that the database has been set up:

      grails -version

    • 5

      Ensure that the data displayed in the command line window matches what is displayed below so that you know your database has been properly set up:

      Welcome to Grails 1.0 - http://grails.org/

      Licensed under Apache Standard License 2.0

      Grails home is set to: /opt/grails

Related Searches:

References

Comments

Related Ads

Featured