I. The entire application of the system platform runs on the same Linux environment. Reference Operating System: Hongqi DCServer5.0forx86SP2 application software: ASP intermediate environment: iASP2.
I. The entire application of the system platform runs on the same Linux environment. Reference Operating System: Hongqi DC Server 5.0 for x86 SP2 application software: ASP intermediate environment: iASP 2.
We have provided a method to connect to an independent ms SQL Server 5.0 using ASP Based on Hongqi DC Server 2000 and iASP. The advantage of this method is that you do not need to modify the user's database environment. However, the disadvantage is that you need to use a database Server that runs Windows 2000 Server independently, resulting in a waste of resources.
In fact, we also have a method that combines the above two modes: Connecting ASP to the Mysql database through iASP. Currently, Mysql 5.5 is quite powerful. If the database only uses the standard SQL language, it is not difficult to import data from SQL 2000 or Access to Mysql. Mysql databases based on the linnoDB data engine can also implement transaction processing, stored procedures, triggers, and log rollback. Mysql is a powerful open-source database.
I. System Platform
The entire application runs on the same Linux environment:
Reference
Operating System: Hongqi DC Server 5.0 for x86 SP2
Application Software: ASP
Intermediate environment: iASP 2.1.1
Database: Mysql 4.1
2. Create a database
The red flag DC Server 5.0 comes with Mysql 4.1, which supports multi-Character Set environments.
Start:
# Service mysqld start
Create a database:
Reference
# Mysql
Mysql> create database 'testdb' default character set gbk COLLATE gbk_chinese_ci;
Set character set:
Reference
Mysql> set names 'gbk ';
Create a table:
Reference
Mysql> use testdb;
Mysql> create table 'customer '(
'Mermerid' int (3) not null default '0 ',
'Companyname' varchar (100) not null default '',
'Contactname' varchar (100) not null default '',
Primary key ('mermerid ')
) ENGINE = MyISAM default charset = gbk;
Insert data:
Reference
Mysql> insert into MERs (CustomerID, CompanyName, ContactName) values (1, 'South China University of Technology ', 'no. 168, Wushan Road, Guangzhou'), (2, 'Sun Yat-sen University ', '88 Xiaogang Road, Guangzhou ');
View:
Reference
Mysql> set names 'gbk ';
Mysql> select * from MERs MERS;
+ ------------ + -------------- + ------------------- +
| CustomerID | CompanyName | ContactName |
+ ------------ + -------------- + ------------------- +
| 1 | south China University of Technology | No. 168, Wushan Road, Guangzhou |
| 2 | Sun Yat-sen University | No. 88, Xiaogang Road, Guangzhou |
+ ------------ + -------------- + ------------------- +
2 rows in set (0.00 sec)
Configure permissions:
Reference
Mysql> grant all on testdb. * to linuxing @ 'localhost' identified by 'redflag ';
Mysql> flush privileges;
Iii. Install the Mysql jdbc driver
1. Mysql official download
MySQL Connector/J
Local download:
Download files
Click here to download the file
2. Installation
# Tar xzvf mysql-connector-java-5.0.7.tar.gz
# Cd mysql-connector-java-5.0.7
# Cp mysql-connector-java-5.0.7-bin.jar/usr/iasp/iasp21/lib/
3. Configuration
Modify/usr/iasp/iasp21./start-server.sh:
Reference
/Usr/java/j2re1.4.2/bin/java-mx32768000-classpath/usr/java/j2re1.4.2/bin /.. /lib/classes.zip:/usr/java/j2re1.4.2/bin /.. /lib/tools. jar:/usr/iasp/iasp21./lib/jsdk. jar:/usr/iasp/iasp21-lib/iasplib. jar:/usr/iasp/iasp21./lib/activation. jar:/usr/iasp/iasp2/lib/asp2j. jar:/usr/iasp/iasp21./lib/rjax. jar:/usr/iasp/iasp21-lib/ejbcorba. jar:/usr/iasp/iasp21./lib/jndi. jar:/usr/iasp/iasp21-lib/samples. jar:/usr/iasp/iasp21./lib/hado. jar:/usr/iasp/iasp21./lib/pop3.jar:/usr/iasp/iasp21./lib/mail. jar:/usr/iasp/iasp21-lib/iasp_fileup.jar:/usr/iasp/iasp21-lib/iasp_mail.jar:/usr/iasp/iasp21-lib/iasp_grid.jar: /usr/iasp/iasp21-lib/iasp_nntp.jar:/usr/iasp/iasp21-lib/iasp_exec.jar:/usr/iasp/iasp21-lib/iasp_inet.jar: /usr/iasp/iasp21-lib/iasp_upload.jar:/usr/iasp/iasp21-lib/iasp_http.jar:/usr/iasp/iasp21-lib/iasp_pop3.jar: /usr/iasp/iasp21-lib/iasp_chart.jar:/usr/iasp/iasp21-lib/iasp_image.jar:/usr/iasp/iasp21-lib/iasp_sock.jar: /usr/iasp/iasp21-lib/iasp_xmldom.jar:/usr/iasp/iasp21-servlets:/usr/iasp/iasp21-lib/rjaxADODB. jar:/opt/msSQLjdbc/lib/msbase. jar:/opt/msSQLjdbc/lib/mssqlserver. jar:/opt/msSQLjdbc/lib/msutil. jar:/Usr/iasp/iasp21/lib/mysql-connector-java-5.0.7-bin.jarServlet. http. HttpServer