Oracle GlassFish Server 3.0.1 Scripting Framework Guide

ProcedureTo Set Up the MySQL Database Server

Before You Begin

JRuby, Rails, and the required Gems should already be installed, as described in Installing JRuby and Rails.

  1. Download and install MySQL database server:

    MySQL Server is available from the MySQL Downloads page. MySQL installation instructions are available from the MySQL Documentation page.

  2. Configure the server according to the MySQL documentation, including entering a root password.

  3. Start the MySQL server.

  4. Install the JRuby activerecord-jdbcmysql-adapter gem, if necessary.

    For example:

    gem install activerecord-jdbcmysql-adapter
  5. Modify the database.rake script for your Rails installation so it uses jdbcmysql rather than mysql.

    For example, if using the version of JRuby and Rails installed through GlassFish Server Update Center on Solaris or Linux, the database.rake file is located in:


    Change all instances of mysql with jdbcmysql, and then save the file.