一、系統(tǒng)平臺(tái)整個(gè)應(yīng)用運(yùn)行在同一臺(tái)Linux環(huán)境之上:引用操作系統(tǒng):紅旗DC Server 5.0 for x86 SP2應(yīng)用軟件:ASP中間環(huán)境:iASP 2.
前面提供了基于紅旗DC Server 5.0配合iASP,,使用ASP連接到獨(dú)立的MS SQL Server 2000上的方式。這種方式的優(yōu)點(diǎn)是,不用修改用戶的數(shù)據(jù)庫(kù)環(huán)境。但缺點(diǎn)就是,需要占用一臺(tái)獨(dú)立運(yùn)行Windows 2000 Server的數(shù)據(jù)庫(kù)服務(wù)器,帶來資源上的浪費(fèi)。
實(shí)際上,我們還有一種結(jié)合上述兩種模式的方法:讓ASP通過iASP連接到Mysql數(shù)據(jù)庫(kù)上。當(dāng)前的Mysql 5.5已經(jīng)相當(dāng)?shù)膹?qiáng)大,如果數(shù)據(jù)庫(kù)中只是使用標(biāo)準(zhǔn)的SQL語言,從SQL 2000或Access中把數(shù)據(jù)導(dǎo)入到Mysql中都不會(huì)很困難。而在基于linnoDB數(shù)據(jù)引擎的Mysql數(shù)據(jù)庫(kù)也可以實(shí)現(xiàn)事務(wù)處理、存儲(chǔ)過程、觸發(fā)器、日志回滾等工作。Mysql是一個(gè)相當(dāng)強(qiáng)大的開源數(shù)據(jù)庫(kù)。
一、系統(tǒng)平臺(tái)
整個(gè)應(yīng)用運(yùn)行在同一臺(tái)Linux環(huán)境之上:
引用
操作系統(tǒng):紅旗DC Server 5.0 for x86 SP2
應(yīng)用軟件:ASP
中間環(huán)境:iASP 2.1.1
數(shù)據(jù)庫(kù):Mysql 4.1
# service mysqld start
引用
# mysql
mysql>CREATE DATABASE `testdb` DEFAULT CHARACTER SET gbk COLLATE gbk_chinese_ci;
引用
mysql>set names 'gbk';
引用
mysql> use testdb;
mysql>CREATE TABLE `Customers` (
`CustomerID` int(3) NOT NULL default '0',
`CompanyName` varchar(100) NOT NULL default '',
`ContactName` varchar(100) NOT NULL default '',
PRIMARY KEY (`CustomerID`)
) ENGINE=MyISAM DEFAULT CHARSET=gbk;
引用
mysql>insert into Customers (CustomerID,CompanyName,ContactName) values (1,'華南理工大學(xué)','廣州市五山路168號(hào)'),(2,'中山大學(xué)','廣州市曉港路88號(hào)');
引用
mysql> set names 'gbk';
mysql> select * from Customers;
+------------+--------------+-------------------+
| CustomerID | CompanyName | ContactName |
+------------+--------------+-------------------+
| 1 | 華南理工大學(xué) | 廣州市五山路168號(hào) |
| 2 | 中山大學(xué) | 廣州市曉港路88號(hào) |
+------------+--------------+-------------------+
2 rows in set (0.00 sec)
引用
mysql>grant all on testdb.* to linuxing@'localhost' identified by 'redflag';
mysql> flush privileges;
下載文件
點(diǎn)擊這里下載文件
# 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/
引用
/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/iasp21/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.jar servlet.http.HttpServer
聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com