• Like
  • Save
Installation 4-database-connection
Upcoming SlideShare
Loading in...5

Installation 4-database-connection






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Installation 4-database-connection Installation 4-database-connection Presentation Transcript

    • Database Connection Copyright © 2000-2006 Liferay, Inc. All Rights Reserved. No material may be reproduced electronically or in print without written permission from Liferay, Inc.
    • Objectives
      • Liferay Portal Development
      • Set up MySQL
      • Create the Database
      • Populate the Database
      • Configure Tomcat to use the MySQL Database
    • Install MySQL
      • Double click mysql-5.0.24-win32.exe
      • Install MySQL using the default settings
      • At the MySQL.com Sign-up screen, select Skip Sign-up
    • Install MySQL
    • Install MySQL
      • Click Finish to run the MySQL Server Instance Configuration Wizard
      • Select Standard Configuration
    • Install MySQL
      • Select Include Bin Directory in Windows PATH
      • Enter asdf for the password
      • Retype asdf to confirm the password
      • Select Create an anonymous account
      • On the next screen, click Execute
    • Connection Error
      • If the Connection Error window pops up, click Skip . This occurs because the data directory was not removed.
      • If you see this screen, you will need to run the Configuration Wizard again.
      • Create a database called “training”
      • Click Start  Run…
      • Type cmd and press Enter
      • Type mysql
      • Type create database training;
      • Populate your database
      • Click Start  Run…
      • Type cmd and press Enter
      • Navigate to the C:Trainingliferayextsqlportal directory
      • Type mysql training < portal-mysql.sql
      • Configure Tomcat to use MySQL
      • Go to C:TrainingliferaytomcatconfCatalinalocalhost
      • Open ROOT.xml with Notepad
      • Change the driverClassName from org.hsqldb.jdbcDriver to com.mysql.jdbc.Driver driverClassName=“com.mysql.jdbc.Driver”
      • Change the url from jdbc:mysql:test to url=“jdbc:mysql://localhost/training?useUnicode=true&amp;characterEncoding=UTF-8”
      • Change the username to root username=“root”
      • Change the password to asdf password=“asdf”
      Configure Tomcat to use MySQL
    • Deploy the MySQL Driver
      • Copy mysql.jar from C:Trainingliferay extlib development to C:Trainingliferay extext-lib global
      • Click Start  Run…
      • Type cmd and press Enter
      • Navigate to the C:trainingliferayext
      • Type ant deploy
      • Verify that mysql.jar was deployed to C:Trainingliferaytomcatcommonlibext
    • Congratulations!
      • You’ve just set up the database connection!
      • Set up MySQL
      • Created a database called training
      • Populated the database with the portal-mysql.sql script
      • Configured ROOT.xml to use the MySQL database instead of the Hypersonic database
    • Revision History
      • Edward Shin 8/28/2006 Updated for Liferay 4.1.1
      • Mark Wong 9/12/2006 Updated MySQL version