How to configure a MySQL data source in TOMCAT5

Source: Internet
Author: User
Tags mysql in create database

I. Configure environment variables:

Softe Version:tomcat5.0.12/mysql4.1.7/mysql_driver---
Mysql-connector-java-3.1.4-beta-bin.jar

MySQL driver can be downloaded from www.mysql.com official website

Path:

Tomcat5 in D:\MYWEB\TOMCAT5;

MySQL in C:\Program files\mysql\mysql Server 4.1

Path (plus on the original basis):

D:\myweb\tomcat5\bin;d:\myweb\jdk1.4;d:\myweb\

Jdk1.4\bin;

D:\myweb\tomcat5\common\lib\servlet-api.jar; C:\Program files\

Mysql\mysql Server4.1\bin

Classpath:d:\myweb\tomcat5\common\lib\servlet-api.jar;d:\myweb\tomcat5\common\lib\jsp-api.jar

java_home:d:\myweb\jdk1.4

Catalina_home:d:\myweb\tomcat5

Second, the establishment of test database

Build a Forumdb database in MySQL, and create a table member as follows:

Create Database Forumdb;
CREATE TABLE Member
(
ID int,
Name varchar (6)
);

Then insert two test data as follows:

Insert INTO member values (1, "Zhang");
Insert into member values (2, "Wang");

At this point, the database is ready to complete.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.