Win2003 + MySQL-4.0.2 + Tomcat 5.0 configuration

xiaoxiao2021-03-06  40

Win2003 MySQL-4.0.2 Tomcat 5.0 configuration

Specific implementation steps:

First, software preparation:

My is a hard software environment that can run Win2003.

1. J2SDK1.4.2_06

2. MySQL-4.0.23-WIN.ZIP

3. Tomcat 5.0 http://www.apache.org/

4. mm.mysql-2.0.4-bin.jar:

Http://mysql.ihostunit.com/downloads/contrib/mm.mysql-2.0.4-bin.jar Download

5. MySQL-Administrator-1.0.19-win

6. MySQL-Query-Browser-1.1.5-win

Second, the software installation:

1. Install J2SDK:

Install according to the installation wizard (generally installed to C: /J2SDK1.4.2_06, convenient to operate);

2. Install MySQL:

Install according to the installation wizard (select the installation directory to C: /, easy to operate; after the installation is successful, its path is:

C: / mysql);

If it is manually installed to build a My.ini file in a Windows directory, Mouli [winmysqladmin] server = c: /mysql/bin/mysqld-nt.exe [mysqld] basedir = c: / mysql datadir = C: / mysql / data Default-character-set = GBK

The above "Server" points to the execution of MySQL, "Basedir" points to the mysql installation directory, "

"DataDir" points to the data stored directory of MySQL (because I have changed it, so I need special specified). Then move this file into the Windows system installation directory, I am "c: / windows" here.

Open the MS-DOS window, switch to the "c: / mysql / bin" directory; or add "c: / mysql / bin"

In the "path" variable of "environment variable", this can avoid switching to the "c: / mysql / bin" directory

. · Add to Windows 2003 service: c: / mysql / bin> MySQLD-NT -INSTALL

Start and stop MySQL service C: / mysql / bin> Net start mysql c: / mysql / bin> Net Stop MySQL

3. Install Tomcat:

Follow the installation wizard (Change the installation directory to C: / tomcat 5.0, you will want you to enter admin

Password (system administrator);

4. Place the JDBC driver of MySQL:

Place mm.mysql-2.0.4-bin.jar files under C: /J2SDK1.4.2_06/LIB and C: / Tomcat 5.0

/ Common / lib under C: / Tomcat 5.0 / Common / LIB / mm.mysql-2.0.4-bin.jar

CHASSPATH

Third, the first configuration and test:

For the first configuration of the software environment installed, and test its environment:

(1) Configuration - environment variable:

1. New system variable java_home, its value: c: /j2sdk1.4.2_06 (if you do not press the path

Please change your installation path);

2. New system variable tomcat_home, its value is: C: / Tomcat 5.0 (if you don't press the above path installation, please change to your installation path);

3. System variable ClassPath, added, its value is: C: / Tomcat 5.0

/ common / classes; C: / Tomcat 5.0 / Common / LIB

4. System variable classpath, added, its value is: c: /j2sdk1.4.2_06/lib/mm.mysql-2.0.4

-bin;

2) Test the default service:

1. Please launch Tomcat 5.0 (find Apache Tomcat 5.0 running Start in the program)

Tomcat service:

Open the browser, type in the address bar: http: // localhost: 8080 Test: You can in the browser at this time

See Tomcat's welcome interface. Description Tomcat works fine (note that the Tomcat default port is 8080, if

If you have other programs, please change it);

2. Start the mysql service (MySQL service is started with the operating system by default, and there is winmysqladmin.exe minimum

On the system tray):

Enter CMD, go to the c: / mysql / bin directory, execute mysql, enter, normal, output some welcome letters

Interest, indicating that mysql work is normal;

Fourth, integrated configuration:

Do the corresponding configuration for MySQL and Tomcat 5.0, let them work together:

1. Copy mm.mysql-2.0.4-bin.jar to Tomcat's CommON / lib directory;

2. The test is normal; save the following code to Test.jsp to C: / Tomcat 5.0

/ WebApps / root directory:

<% @ page import = "java.sql. *"%> <% out.println ("border is me!"); try {class.forname ("org.gjt.mm.mysql.driver"). NewInstance ); (Exception E) {OUT.PRINTLN ("Unable to load driver.");}%>

3. Enter http: // localhost: 8080 / test.jsp in the browser's address. If you run, appear

Border is me! That is to mean that mysql is integrated with Tomcat5;

6. Supplementary description:

1. MySQL download address: http://dev.mysql.com/downloads/ "Graphical Clients" graphical interface client, select one, you can make a graphical operation

Why don't you? But I have always used "MySQL Control Center", but now

I have sent it. Select "MySQL Administrator", the downloaded file name is "mysql-

Administrator-1.0.19-win-noinstall.zip "(here I chose no installation version

), The size is 4.5m. Also select "MySQL Query Browser", it is to query. The file name after download is

"MySQL-QUERY-BROWSER 1.1.5-WIN-NOINSTALL.ZIP" (no installation version), the size is 4.5m.

Application Programming Interfaces (APIS) "application interface because I mainly

For Java applications, you choose "MySQL Connector / J", version selection "mysql

Connector / J 3.0 "because it is a" propdution "version. The downloaded file name is" mysql

-connector-java-3.0.16-ga.zip ", the size is 1.2m.

2. I am a mysql-5.0.2-alpha-win.zip database when I started.

Some errors, later replaced with mysql-4.0.23-win.zip problem (call me depressed long!)

3. If you feel satisfied, I want to reprint or collect this article, I am very grateful, but please indicate the author.

Border (border@hanacker.cn)

Finally, please visit - China Safety Information Network - http://www.hacker.cn/

转载请注明原文地址:https://www.9cbs.com/read-52047.html

New Post(0)