How to integrate the custom database with the openfire 3.8.2

HIII

I am new to this technology please can anyone help me in this how to configure the custom database for user login access with my own existing db in stsep by step process…

Please help me to over come this …

Thanks in Advance…

I am using mysql database …

**my users table structure is **

CREATE TABLE user_master (

user_id int(11) NOT NULL AUTO_INCREMENT,

emp_code varchar(45) DEFAULT NULL,

username varchar(45) DEFAULT NULL,

password varchar(45) DEFAULT NULL,

display_name varchar(45) DEFAULT NULL,

created_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

created_by varchar(45) DEFAULT NULL,

modified_date timestamp NOT NULL DEFAULT ‘0000-00-00 00:00:00’,

modified_by varchar(45) DEFAULT NULL,

emp_id int(11) NOT NULL,

role_id int(11) NOT NULL,

email varchar(45) DEFAULT NULL,

PRIMARY KEY (user_id),

KEY FK_user_master_1 (emp_id),

KEY FK_user_master_2 (role_id)

) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;