Win2003 + MySQL-4.0.2 + Tomcat 5.0 configuration

xiaoxiao2021-03-05  23

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 you are manually installed, you should build a My.ini file in the Windows directory.

[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 MySQL data storage directory (because I have changed it, so I need special specified).

Then move this file to the Windows system installation directory, I am "c: / windows".

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 do not press the above path to install

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 and enter: in the address bar:

Http: // localhost: 8080 Test: Can be 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:

3, enter in the browser's address

Http: // localhost: 8080 / test.jsp 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/

The client of the "Graphical Clients" graphics interface, 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), size

It 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.

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

New Post(0)