Download presentation
Presentation is loading. Please wait.
Published byEmmeline Price Modified over 9 years ago
1
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.
2
Objectives Liferay Portal Development 1.Set up MySQL 2.Create the Database 3.Populate the Database 4.Configure Tomcat to use the MySQL Database
3
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
4
Install MySQL
5
Click Finish to run the MySQL Server Instance Configuration Wizard Select Standard Configuration
6
Install MySQL Select Include Bin Directory in Windows PATH
7
Enter asdf for the password Retype asdf to confirm the password Select Create an anonymous account On the next screen, click Execute
8
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.
9
Create a database called “training” 1.Click Start Run… 2.Type cmd and press Enter 3.Type mysql 4.Type create database training;
10
Populate your database 1.Click Start Run… 2.Type cmd and press Enter 3.Navigate to the C:\Training\liferay\ext\sql\portal directory 4.Type mysql training < portal-mysql.sql
11
Configure Tomcat to use MySQL 1.Go to C:\Training\liferay\tomcat\conf\Catalina\localhost 2.Open ROOT.xml with Notepad
12
1.Change the driverClassName from org.hsqldb.jdbcDriver to com.mysql.jdbc.Driver driverClassName=“com.mysql.jdbc.Driver” 2.Change the url from jdbc:mysql:test to url=“jdbc:mysql://localhost/training?useUnicod e=true&characterEncoding=UTF-8” 3.Change the username to root username=“root” 4.Change the password to asdf password=“asdf” Configure Tomcat to use MySQL
13
Deploy the MySQL Driver 1.Copy mysql.jar from C:\Training\liferay\ext\lib\development to C:\Training\liferay\ext\ext-lib\global 2.Click Start Run… 3.Type cmd and press Enter 4.Navigate to the C:\training\liferay\ext 5.Type ant deploy 6.Verify that mysql.jar was deployed to C:\Training\liferay\tomcat\common\lib\ext
14
Congratulations! You’ve just set up the database connection! 1.Set up MySQL 2.Created a database called training 3.Populated the database with the portal-mysql.sql script 4.Configured ROOT.xml to use the MySQL database instead of the Hypersonic database
15
Revision History Edward Shin8/28/2006Updated for Liferay 4.1.1 Mark Wong9/12/2006 Updated MySQL version
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.