Monday, January 14, 2008

Liferay Installation 4 : Database Connection

1.Download MySQL

2.Install MySQL

3. Create the MySQL database

4. Populate the MySQL database

5.Configure Tomcat to use MySQL

6.Copy mysql.jar

7.Deploy the MySQL Driver



1.Download MySQL



Download MySQL 4.1Windows Essentials (x86)

http://dev.mysql.com/downloads/mysql/4.1.html



2.Install MySQL



(i) Install MySQL by double clicking mysql-essential-4.1.*-win32.msi

(ii) Select Typical

(iii) Select Skip Sign-up

(iv) Click Finish to run the MySQL Server Instance Configuration Wizard







(i))Select Standard Configuration

(ii)Select Include Bin Directory in Windows PATH

(iii))Click Next







(i)Enter asdf for the password

(ii)Select Create An Anonymous Account

(iii)On the next screen, click Execute



3. Create the MySQL database



(i) Click Start - Run

(ii) Type cmd

(iii) Type mysql

(iv) Type create database training;



4. Populate the MySQL database







(i)Click Start - Run

(ii) Type cmd

(iii) Go to C:\training\liferay\ext\sql\portal (in command prompt)

(iv) Type mysql training <>

5.Configure Tomcat to use MySQL



(i) Go to C:\training\liferay\tomcat\conf\Catalina\localhost

(ii) Open ROOT.xml with Notepad






(iii)Change the driverClassName

driverClassName="com.mysql.jdbc.Driver"

(iv) Change the url

url="jdbc:mysql://localhost/training?useUnicode=true&characterEncoding=UTF-8"

(v) Change the username

username="root"

(vi)Change the password

password="asdf"


Your Root.xml will look like this:







6.Copy mysql.jar



(i) Go to C:\training\liferay\ext\lib\development

(ii) Copy mysql.jar

(iii) Go to C:\training\liferay\ext\ext-lib\global and paste mysql.jar here



7.Deploy the MySQL Driver


(i) Click Start - Run

(ii) Type cmd and press Enter

(iii) Go to C:\training\liferay\ext ( in Command prompt)

(iv) Type ant deploy







(v) Checkpoint!

Go to C:\training\liferay\tomcat\common\lib\ext and

verify that mysql.jar exists



Congratulations!

You have just configured Tomcat to use a

MySQL database!





Troubleshooting: Connection Error

(i) If the Connection Error window pops up, click Skip

(ii) Click Start - Programs - MySQL - MySQL Server 4.1 - MySQL Server Instance Config Wizard

(iii) Reconfigure MySQL





- Gnaniyar

1 comment:

Empress Cruises & Events said...

Liferay Installation for database connection its very helpful for who have error in database....