Feed on
Subscription

The MySQL that settles way forgets super user countersign

? ? if MySQL is moving,Kill above all:Killall -TERM Mysqld.
? ?
? ? starts MySQL:Bin/safe_mysqld- - Skip-grant-tables %26amp;
? ?
? ? need not need a password to enter MySQL.
? ?
? ? is next
? ?
? ? %26gt; Use Mysql
? ?
? ? %26gt; Update User Set Password=password(%26quot;new_pass%26quot;) Where User=%26quot;root%26quot;;
? ?
? ? %26gt; Flush Privileges;
? ?
? ? kills MySQL afresh,Start MySQL with regular method.

...

Learn command of MySQL commonly used operation

1, server of the MySQL that start

Actual before last piece already told how to start MySQL.Two kinds of methods:It is with Winmysqladmin,If the machine is started when move automatically already,Can enter next operations directly.Two it is in DOS means issues moving D:mYsqlbinmysqld

2, enter Mysql to operate an interface interactively

Below DOS means,Move:D:mYsqlbinmysql

Appear: The clew accord with of Mysql,The alternant mode of operation that already entered Mysql right now.

If appear "ERROR 2003: ' of Localhost of ' of Can ' T Connect To MySQL Server On (10061) " ,

The MySQL that shows you has not been started.

3, exit MySQL to operate an interface

Quit is inputted to be able to exit alternant operation interface at any time below Mysql%26gt; clew accord with:Mysql%26gt;Quit
Bye
You also can be exited with Control-D.

4, the first command


...

MySQL expresses memory structure function two kinds to check a process quite

MyISAM of format of memory of two kinds of when MySQL supports main watches,InnoDB,When making an item last month,Used InnoDB first,Result rate is particularly slow,1 second can insert a few 10 only.Change MyISAM pattern later,One second inserts on ten thousand.The function of these two watches that become aware at that time also the difference is too big.Oneself are conjectural later,Not should the difference is so slow,Estimation is written insertion the statement has a problem,The decision does a test:

Test environment:Redhat Linux9,4CPU,Memory 2G,MySQL version is 4.1.6-gamma-standard

Test program:Module of Python + Python-MySQL.

Test program:

1, MyISAM format checks respectively,General affairs and need not general affairs two kinds of circumstances:

2, InnoDB format checks AutoCommit = respectively 1 (need not Begin Transaction and with Begin Transaction mode) ,

AutoCommit=0 (need not Begin Transaction and with Begin Transaction mode) four kinds of circumstances.

Test method is recorded to insert 10000.For the test not interact,Built appropriative to check a watch alone,The statement that build a list is as follows:

1, MyISAM is not expressed with general affairs:

CREATE TABLE `MyISAM_NT` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=MyISAM;

2, MyISAM expresses with general affairs:

CREATE TABLE `MyISAM_TS` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=MyISAM;

3, InnoDB shuts AutoCommit,Need not general affairs:

CREATE TABLE `INNODB_NA_NB` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=InnoDB;

4, InnoDB shuts AutoCommit,With general affairs:

CREATE TABLE `INNODB_NA_BE` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=InnoDB;

5, InnoDB open AutoCommit,Need not general affairs:

CREATE TABLE `INNODB_AU_NB` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=InnoDB;

6, InnoDB open AutoCommit,With general affairs:

CREATE TABLE `INNODB_AU_BE` (

`TableId` Int(11) NOT NULL Default '0' ,

`TableString` Varchar(21) NOT NULL Default ''

) ENGINE=InnoDB;

The Python script of the test is as follows:

# ! / Usr/bin/env Python

'''

MyISAM, innoDB function is compared

Author:Hollow dish (Invalid)

Time: 2004-10-22

'''
Import MySQLdb
Import Sys
Import Os
Import String
Import Time
C = None
Testtables = [("MyISAM_NT" , none, 0) ,

("MyISAM_TS" , none, 1) ,

("INNODB_NA_NB" , 0, 0) ,

("INNODB_NA_BE" , 0, 1) ,

("INNODB_AU_NB" , 1, 0) ,

("INNODB_AU_BE" , 1, 1)

1)
Def BeginTrans() :
Print "ExecSQL:BEGIN; "
C.execute("BEGIN;" )
Return
Def Commit() :
Print "ExecSQL:COMMIT; "
C.execute("COMMIT;" )
Return
Def AutoCommit(flag) :
Print "ExecSQL:SEt AUTOCOMMIT = "+str(flag)
C.execute("Set AUTOCOMMIT = "+str(flag) )
Return
Def Getcount(table) :

#print "ExecSQL:sElect Count(*) From "+table
C.execute("select Count(*) From "+table)
Return C.fetchall()[0][0]
Def AddTable (Table, tableId, tableString) :
Sql = "INSERT INTO "+Table+"(TableId, tableString) VALUES("+ TableId+ " , '" + TableString +"') "
Try:
C.execute(sql)
Except MySQLdb.OperationalError, error:
Print "AddTable Error:" , error
Return -1;
Return C.rowcount
Def Main() :
Argv = Sys.argv
If Len(argv)%26lt;2:
Print 'Usage:', argv[0] , ' TableId TestCount \n'
Sys.exit(1)
Global C #mysql visits Cursor
Db_host = "localhost "
Db_name = "demo "
Db_user = "root "
Db_user_passwd = " "
Print "Config:[%s %s/%s %s] DB\n"%(db_host, db_user, db_user_passwd, db_name)
If Len(argv)%26gt;2:
Tableid = Argv[1]
Testcount = Int(argv[2]) #
For Test In Testtables:

Before # is operated every time, rescript establish database link
Try:
Mdb = MySQLdb.connect(db_host, db_user, db_user_passwd, db_name)
Except MySQLDb.OperationalError, error:
Print "Connect Mysql[%s %s/%s %s] DB Error:" %(db_host, db_user, db_user_passwd, db_name) , error, "\n "
Sys.exit(1)
Else:
C = Mdb.cursor()
Table, autocommit, trans = Test
Starttime = Time.time()
Print Table, "" , time.strftime("%y-%m-%d %H:%M:%S" , time.localtime() )
If Autocommit! = None:

AutoCommit(autocommit)
If Trans==1:

BeginTrans()
For I In Xrange(testcount) :
Tablestring = "%020d"%i
If (AddTable(table, tableid, tablestring)%26lt;1) :
Print "AddTable Error" , tablestring
If Trans==1:

Commit()
Print Time.strftime("%y-%m-%d %H:%M:%S" , time.localtime() )
Endtime = Time.time()
Usedtime = Endtime-starttime
Print Table, "Count:" , getcount(table) , "Used Time:" , usedtime
C.close()
Mdb.close()
If __name__=='__main__' :
Main()

The test is as follows as a result:

Config:[Localhost Root/ Demo] DB

MyISAM_NT 04-10-22 16:33:24

04-10-22 16:33:26

MyISAM_NT Count: 10000 Used Time: 2.1132440567

MyISAM_TS 04-10-22 16:33:26

ExecSQL:BEGIN;

ExecSQL:COMMIT;

04-10-22 16:33:29

MyISAM_TS Count: 10000 Used Time: 2.65475201607

INNODB_NA_NB 04-10-22 16:33:29

ExecSQL:SEt AUTOCOMMIT = 0

04-10-22 16:33:31

INNODB_NA_NB Count: 10000 Used Time: 2.51947999001

INNODB_NA_BE 04-10-22 16:33:31

ExecSQL:SEt AUTOCOMMIT = 0

ExecSQL:BEGIN;

ExecSQL:COMMIT;

04-10-22 16:33:35

INNODB_NA_BE Count: 10000 Used Time: 3.85625100136

INNODB_AU_NB 04-10-22 16:33:35

ExecSQL:SEt AUTOCOMMIT = 1

04-10-22 16:34:19

INNODB_AU_NB Count: 10000 Used Time: 43.7153041363

INNODB_AU_BE 04-10-22 16:34:19

ExecSQL:SEt AUTOCOMMIT = 1

ExecSQL:BEGIN;

ExecSQL:COMMIT;

04-10-22 16:34:22

INNODB_AU_BE Count: 10000 Used Time: 3.14328193665

Conclusion:

The main reason that is informed influence speed from this is AUTOCOMMIT acquiescent setting is open,

My program at that time is done not have explicit call BEGIN; to begin work,Bring about every to insert an automatic Commit,Affected rate badly.

Calculate coming also is an elementary mistake!

Relevant reference:
Http://dev.mysql.com/doc/mysql/en/COMMIT.html
Http://dev.mysql.com/doc/mysql/en/InnoDB_and_AUTOCOMMIT.html

...

MySQL security guideline (1)

As the systematic manager of a MySQL,You are responsible the data security of the MySQL database system that maintains you and integrality.The MySQL system that the article basically basically introduces how to build a safety,From systematic interior and exterior network two angle,Provide a guide for you.

The issue that the article basically considers following security to concern:

Why security is very important,You should be on guard those attack?
The risk that the server faces (internal security) ,How to handle?
The client of join server carries a risk (external security) ,How to handle?
MySQL manager is responsible the security that assures database content,Make these data logging can be visited by the user of those proper authorization only,The internal security that this involves database system and external security.
The problem that what internal security cares is file system level,Namely,Avoid MySQL data list (DATADIR) by the person that there is Zhang number in server lead plane (lawful or of filch) have charge.If the attributive of data catalog content is beyond the mark,award,Make the document that everybody all replaces correspondence can simply to be expressed at those databases,So the accredit watch setting that ensures control client is visited through the network is proper,Insignificant to this fine long hair.

What external security cares is from exterior through the problem of the client of network join server,Namely,Protective MySQL server is avoided suffer come from atttack to the connective of the server through the network.You must install MySQL accredit to express (Grant Table) ,Make the database content that they do not allow to visit server management,Unless offer effective user name and word of command.

How does detailed introduction install file system and accredit watch Mysql below,The two class security that achieves MySQL.


One, internal security - the safety that makes sure data catalog is visited
MySQL server provided a flexible attributive system through the accredit watch in MySQL database.The content that you can set these tables,The visit that allow or rejects client logarithm to occupy a library,This offerred you to prevent not the safe method that the network visit of accredit atttacks to your database,If other user can be direct on lead plane,visit data catalog content however,Build the good security that visits a database to carrying a network to be without a help to you,The exclusive user that unless you know you are entry MySQL server,runs main engine,Otherwise the possibility of the visit that you need to care the other user on this machine to obtain logarithm to occupy catalog.

It is the content that you should protect below:

Database file.Apparently,The illicit of the database that you want to defend server management uses a sex.Database owner normally and the security that should consider database content,Although they do not think,Be brought into the public of content of the database when also should considering,The security that is not the data list that carries how terrible will expose these content.
Log file.Must assure safety with newer daily record commonly,Because they include inquiry text version.The operation that the one that has visit limits of authority to log file can monitor the database has undertaken.
The log file security that should consider mainly more is such as GRANT and SET PASSWORD the inquiry that wait also by account,The text version that contains sensitive inquiry with bag of newer daily record commonly,Include countersign (MySQL use countersign is added close,But it just is applied after had finished a setting build at the following join.The inquiry such as the GRANT of course design elephant that installs a countersign or SET PASSWORD,And these inquire be with account of common text form in log file) .If an aggressor is just as day of file read attributive,Need to run Grep to search the word such as such as GRANT and PASSWORD to discover sensitive information on log file only.
Apparent,You do not want to let what the other user on server lead plane has database catalog file write attributive,Because they can rescript,your condition file or database express a file,But it is very dangerous also to read attributive.If a database expresses a file to be able to be read,take,Take a file secretly and get MySQL itself,The content that shows a list with common text is very troublesome also,Why?Because you want to do following business:

Yourself is installed on server lead plane " tailor-made " MySQL server,But word of the port that one is different from official server version, dowel joint and data catalog.
Moving Mysql_install_db initialization your data catalog,This gifts the attributive of the server that you regard MySQL Root user as to visit you,The complete control that so you have pair of servers to visit a mechanism,It also builds database of a Test.
The Test catalog below the database list that considers correspondence to obtain watch file to copy your server secretly at you.
The server that starts you.You can visit a database to express at will,The copy that SHOW TABLES FROM Test shows to you have a list that comes secretly,The entire content that SELECT * shows their any.
If you really very evil-minded,any faceless users that attributive gives you publicly the server,Such anybody can from the Test database that joins the server visits you anyplace.You publish the database list that comes secretly now at numerous.

...

In MySQL database use C carries out SQL statement

With PostgreSQL likeness,The language that can use a lot of differring will visit MySQL,Include C, C++ , Java and Perl.What concern MySQL from the 5th chapter in Professional Linux Programming is following and paragraphic in,Neil Matthew and Richard Stones used detailed MySQL C interface to introduce how to carry out SQL statement in MySQL database to us.They will discuss the statement that returns data,For example INSERT and the statement that do not return data,For example UPDATE and DELETE.Next,They will write the simple program that retrieves data from the database.

Executive SQL statement

Now,We had had a link,How to and know process an error,It is moment discussion uses our database to come a few real works.Of the SQL that carries out all types advocate key word is Mysql_query:

...

UNICODE, GBK, UTF-8 distinction

Confuse recently on map of animal changing evil spirit,The solution that defeat solution presses the issue that revises quite amused ~ ? to have a file head,Doing half talent to know is Utf-8 code . so..Do these at long last was clear about .

Simple for,Unicode,Gbk and big five values that code namely,And Utf-8, uft-16 and so on is the expressional form . of this valueAnd in front those three kinds of encode are one compatible,Same a Chinese character,Value of those three codes is completely different .The Uncode value that is like " Chinese " and Gbk are different,Hypothesis Uncode is A040,Gbk is B030,And Uft-8 is piled up,It is the formal . that behaves that valueUtf-8 code is organized completely only in the light of Uncode,If GBK wants to turn,UTF-8 must turn first Uncode is piled up,Turn again Utf-8 with respect to OK .

Detailed see below this article . that turn

Talk about Unicode to code,The noun such as brief explanation UCS, UTF, BMP, BOM
This is the interest books that a programmer writes programmer.Alleged interest is to point to can realize a few not clear before ideas easily,Promotional knowledge,Be similar to those who play RPG game to upgrade.The motive that arranges this article is two problems:

Problem one:
Of use Windows notebook " put additionally for " ,Can mix in GBK, Unicode, Unicode Big Endian UTF-8 is changed each other between means of these a few kinds of encode.It is Txt file likewise,Windows is how identify encode way?

The begin of the Txt document that Unicode, Unicode Big Endian and UTF-8 encode discover before my early will be much give a few byte,It is FF, FE respectively (Unicode) , FE, FF (Unicode Big Endian) , EF, BB, BF (UTF-8) .But these mark are to be based on what standard?

Problem two:
A ConvertUTF.c sees on the net recently,Realized UTF-32, UTF-16 and UTF-8 the mutual changeover of means of these three kinds of encode.To Unicode(UCS2) , GBK, UTF-8 these code means,I understand so.But this program makes me a little muddleheaded,Be unable to call to mind what do UTF-16 and UCS2 have to concern.
Examine relevant data,Cleared up these problems at long last,The detail that conveniently also knew a few Unicode.Write into an article,Send had had similar interrogative friend.The article is accomplished as far as possible when writing straightaway,But requirement reader knows what is byte,What is hexadecimal.

0, Big Endian and Little EndianThe different kind that Big Endian and Little Endian are number of CPU processing much byte.For example " Chinese " the Unicode encode of the word is 6C49.So when be being written in the file,It is after all write 6C in front,Or will 49 write in front?If write 6C in front,It is Big Endian.If will 49 write in front,It is Little Endian.

" Endian " this word out " Glenn Buddha travel notes " .When eating an egg, Lilliputian civil war results from is after all from big head (Big-Endian) is knocked or as a child first (Little-Endian) is knocked,Ever had happened six times from this revolting,An emperor sent an order,Another lost kingship.

We translate Endian into commonly " byte foreword " ,Call Big Endian and Little Endian %26quot; large remaining part %26quot; and %26quot; small remaining part %26quot; .

1, character encode, internal code,Conveniently introduces Chinese character coding
The ability after character must code is handled by the computer.The internal code that the default that the computer uses codes means is the computer.Inchoate computer uses 7 ASCII to code,To handle a Chinese character,Programmer designed the GB2312 that is used at simplified Chinese and the Big5 that are used at traditional Chinese.

GB2312(1980 year) altogether collected 7445 character,Include 6763 Chinese characters and 682 other sign.The tall byte of internal code limits of Chinese character area from B0-F7,Low byte from A1-FE,The code that take up it is 72*94=6768.Having 5 room among them is D7FA-D7FE.

The Chinese character that GB2312 supports is too little.The Chinese character 1995 expands normative GBK1.0 collected 21886 symbols,Its cent is Chinese character area and graphic symbol area.Chinese character area includes 21003 character.

To GBK from ASCII, GB2312,These encode methods are to be down compatible,Namely same character always has same code in these plan,The standard from the back supports more character.In these encode,English and Chinese are handled OK and unifiedly.The method that divisional Chinese codes is tall byte is the most exalted do not be 0.According to the appellation of programmer,GB2312, GBK belongs to double byte character set (DBCS) .

The GB18030 2000 is the official state level that replaces GBK1.0.This standard collected 27484 Chinese characters,Still collected Tibetan article, unconscious article, dimension at the same time the main minority character such as my Er article.Say from Chinese character glossary,6582 Chinese characters that GB18030 increased CJK patulous A on the foundation of 20902 Chinese characters of GB13000.1 (Unicode piles up 0x3400-0x4db5) ,Altogether collected 27484 Chinese characters.

The meaning that CJK is Sino-Japanese Han.Unicode is piled up to save,language of Sino-Japanese Han the Three Kingdoms medium character integrates code.The Chinese edition that GB13000.1 is ISO/IEC 10646-1,Be equivalent to Unicode 1.1.

The encode of GB18030 adopts odd byte, double byte and 4 byte plan.Among them odd byte, double byte and GBK are completely compatible.The code that 4 byte code collected CJK namely 6582 Chinese characters of patulous A.For example:The 0x3400 of UCS codes mediumly in GB18030 should be 8139EF30,The 0x3401 of UCS codes mediumly in GB18030 should be 8139EF31.

Microsoft offerred GB18030 upgrade bag,But this upgrades the bag just offerred CJK of a support the new style of 6582 Chinese characters of patulous A:Body of new the Song Dynasty - 18030,Do not change an internal code.The internal code of Windows remains GBK.

There still are a few details here:

Of GB2312 textual still be an area code,From the area pile up an internal code,Need adds A0 respectively on tall byte and low byte.

To any character encode,The order of encode unit is by what encode plan appoints,Have nothing to do with Endian.For example the encode unit of GBK is byte,Show a Chinese character with two byte.The order of these two byte is fixed,The effect that does not get CPU byte order.The encode unit of UTF-16 is Word (double byte) ,The order between Word is encode plan appoint,The byte of Word interior arranges ability to be able to get the influence of Endian.UTF-16 still can introduce from the back.

Of two byte of GB2312 the most exalted it is 1.But the code that accords with this condition have 128*128=16384 only.The low byte of GBK and GB18030 is the so most exalted may not be 1.What do not cross this not to affect DBCS character to flow is analytic:Reading when taking DBCS character to flow,Should encounter perch only for the byte of 1,Can regard a double byte as encode below two byte,And what is the perch that need not be in charge of low byte.

2, Unicode, UCS and UTF
Mention in front arrive from ASCII, GB2312, GBK the encode method of GB18030 is to be down compatible.And Unicode as compatible as ASCII (say well and truly,It is as compatible as ISO-8859-1) ,As incompatible as GB code.For example " Chinese " the Unicode encode of the word is 6C49,And GB code is BABA.

Unicode also is method of encode of a kind of character,Nevertheless it is by international organization design,Can hold a whole world the encode plan of all language character.The formal name of Unicode is %26quot;Universal Multiple-Octet Coded Character Set%26quot; ,Abbreviation is UCS.UCS can regard the abbreviate that is %26quot;Unicode Character Set%26quot; .

According to dimension base encyclopedia (the account of Http://zh.wikipedia.org/wiki/) :The organization that is put in two to try to design Unicode independently on the history,Namely international Organization for Standardization (ISO) the association with manufacturer of a software (Unicode.org) .ISO developed ISO 10646 project,Unicode association developed Unicode project.

1991 around,Both sides realises the world does not need two incompatible character set.The working achievement that then they begin amalgamative both sides,An onefold encode is expressed and work in coordination to found.Begin from Unicode2.0,Unicode project used as identical as ISO 10646-1 font and word code.

At present two projects still exist,Independent ground announces respective standard.Unicode association the Unicode 4.1.0 that present newest version was 2005.The newest standard of ISO is ISO 10646-3:2003.

UCS is how the regulation codes only,How to transmit without the regulation, save this encode.For example " Chinese " the UCS encode of the word is 6C49,I can be transmitted with 4 Ascii number, save this encode;Also can code with Utf-8: 3Successive byte E6 B1 89 will express it.The key is wanting to approbate at communication both sides.UTF-8, UTF-7, UTF-16 is the plan that is accepted extensively.A of UTF-8 extraordinary gain is it and ISO-8859-1 completely compatible.UTF is %26quot; UCS Transformation Format %26quot; abbreviate.

The RFC2781 of IETF and RFC3629 with the consistent style of RFC,Clear, lively the encode method that did not break rigorous ground to describe UTF-16 and UTF-8 again.I always write down the abbreviate that getting IETF is Internet Engineering Task Force.But the foundation that the RFC that IETF is in charge of safeguarding is all standards on Internet.

2.1, internal code and Code Page
At present the kernel of Windows has supported Unicode character set,Can support a whole world on the kernel so all language characters.But because showed some much programs and documentation to use some,plant the encode of specific language,For example GBK,Windows does not support existing encode impossibly,And convert entirely Unicode.

Page of Windows use code (Code Page) will get used to each countries and area.Code Page can is by understanding in front mentioned internal code.The Code Page of GBK correspondence is CP936.

Microsoft also defined Code Page for GB18030:CP54936.But because GB18030 has one share,4 byte code,And the code page of Windows supports monomial section and double byte encode only,So this Code Page is cannot use truly.

3, UCS-2, UCS-4, BMP
UCS has two kinds of patterns:UCS-2 and UCS-4.Just as its name implies,UCS-2 codes with two byte namely,UCS-4 uses 4 byte namely (used 31 only actually,The most exalted must be 0) encode.We let make a few simple maths game below:

UCS-2 has 2^16=65536 code,UCS-4 has 2^31=2147483648 code.

UCS-4 basis is the most exalted divide into 2^7=128 for the highest byte of 0 Group.Every Group again basis second tall byte cent is 256 Plane.Every Plane is 256 according to cent of the 3rd byte (Rows) ,Every luggage contains 256 Cells.The Cells of same of course travel is the last byte differs only,The others is same.
The Plane 0 of Group 0 is called Basic Multilingual Plane, namely BMP.In perhaps saying UCS-4,Two tall byte is the code of 0 be called BMP.

Got two before the BMP take out of UCS-4 zero byte UCS-2.On two zero byte is added before two byte of UCS-2,The BMP that got UCS-4.And still be allocated to be besides BMP without any character in current UCS-4 standard.

4, UTF encode

UTF-8 is unit to have code to UCS with 8 namely.Be as follows to the encode means of UTF-8 from UCS-2:

UCS-2 codes (16 into make) reduce expenditure of UTF-8 word (binary system)
0000 - 007F 0xxxxxxx
0080 - 07FF 110xxxxx 10xxxxxx
0800 - FFFF 1110xxxx 10xxxxxx 10xxxxxx

For example " Chinese " the Unicode encode of the word is 6C49.6C49 is between 0800-FFFF,Should use 3 byte pattern plate for certain so:1110xxxx 10xxxxxx 10xxxxxx.Writing 6C49 into the binary system is:0110 110001 001001,Flow with this bit ordinal the X in replacing pattern plate,Get:11100110 10110001 10001001,Namely E6 B1 89.

The code that the reader can check us with notebook is right.Need notices,UltraEdit is when the text file that opens Utf-8 encode can automatic changeover is UTF-16,The possibility arises promiscuous.You can put out this option in the setting.Better tool is Hex Workshop.

UTF-16 has code to UCS for unit with 16.To be less than the UCS of 0x10000 to pile up,16 when UTF-16 encode is equal to UCS to pile up correspondence do not have symbolic integer.To not be less than the UCS of 0x10000 to pile up,Defined an algorithm.The UCS2 that because be used actually,does not pass,Or the BMP of UCS4 is less than 0x10000 necessarily,So current and character,Can think UTF-16 and UCS-2 are basic and identical.But UCS-2 is an encode plan only,UTF-16 is used at actual transmission,The issue that must consider byte order so.

5, the byte foreword of UTF and BOM
UTF-8 is encode unit with byte,The problem that does not have byte foreword.UTF-16 is encode unit with two byte,Before explaining an UTF-16 text,The byte foreword that should clear up every encode unit above all.For example " Kui " Unicode encode is 594E," second " Unicode encode is 4E59.If we receive UTF-16 word reduce expenditure " 594E " ,So this is " Kui " or " second " ?

The mark byte that recommends in Unicode standard is sequential the method is BOM.BOM is not %26quot; Bill Of Material %26quot; BOM is expressed,However Byte Order Mark.The idea that BOM is a petty trick having a place:

In the character that there is to be called %26quot;ZERO WIDTH NO-BREAK SPACE%26quot; in UCS encode,Its encode is FEFF.And FFFE is nonexistent character in UCS,Should not appear in be transmitted actually so.Before UCS standard suggests we flow in transmission byte,Transmit character %26quot;ZERO WIDTH NO-BREAK SPACE%26quot; first.

Such if receiver receives FEFF,Show this word reduce expenditure is Big-Endian;If receive FFFE,Show this word reduce expenditure is Little-Endian.Accordingly character %26quot;ZERO WIDTH NO-BREAK SPACE%26quot; is called BOM again.

UTF-8 does not need BOM to show byte is ordinal,But can demonstrate encode pattern with BOM.The UTF-8 encode of character %26quot;ZERO WIDTH NO-BREAK SPACE%26quot; is EF BB BF (the reader can use the encode method test and verify that introduces before us) .If receiver is received,flow with the byte of begin of EF BB BF so,Knew this is UTF-8 encode.

Windows uses BOM to label namely of the encode means of text file.

6, farther reference material
The data that the article basically consults is %26quot;Short Overview Of ISO-IEC 10646 And Unicode%26quot; (http://www.nada.kth.se/i18n/ucs/unicode-iso10646-oview.html) .

I still looked for two to look good data,The question that begins because of me nevertheless found the solution,Did not look so:

%26quot;Understanding Unicode A General Introduction To The Unicode Standard%26quot; (http://scripts.sil.org/cms/scripts/page.php? Site_id=nrsi%26amp;item_id=IWS-Chapter04a)
%26quot;Character Set Encoding Basics Understanding Character Set Encodings And Legacy Encodings%26quot; (http://scripts.sil.org/cms/scripts/page.php? Site_id=nrsi%26amp;item_id=IWS-Chapter03)
The software that I had written UTF-8, UCS-2, GBK to be changed each other is wrapped,Include to use Windows API and the version that do not use Windows API.If having time later,I can arrange one transfer to a lower level to arrive on my individual homepage (Http://fmddlmyy.home4u.china.com) .

I am the ability after wanting to understand all problems begin to write this article,It is good to think a little while to be able to be written formerly.Did not think of to considered expression and check detail to be cost for a long time,Actually from afternoon 1:30 write 9:00.The hope has a reader to be able to be benefited from which.

Appendix 1 says a division again code, GB2312, internal code and code page
Some friends still have doubt to this word in the article:
" of GB2312 textual still be an area code,From the area pile up an internal code,Need adds A0 respectively on tall byte and low byte."

I explain in detail again:

%26quot; of GB2312 textual %26quot; it is to point to a country a standard 1980 %26quot; exchange of information of level of state of People's Republic of China uses character set of Chinese character coding primary market GB 2312-80 %26quot; .This standard codes with two number Chinese character and Chinese symbol.The first number is called " area " ,The second number is called " " .Also call an area so code.1-9 area is Chinese symbol,16-55 area is one class Chinese character,56-87 area is two class Chinese character.Windows still also has an area now input method,Input for example 1601 get " ah " .(this area the input method can identify automatically 16 mix into the GB2312 that make 10 into the division that make code,Input B0A1 to be able to get likewise that is to say " ah " .)

The internal code is the character encode that points to operating system interior.The internal code of inchoate operating system is related to the language.Present Windows supports Unicode in systematic interior,Get used to all sorts of languages with code page next," internal code " the concept blurred quite.The code that Microsoft assigns default code page commonly says is an internal code.

Internal code this vocabulary,The definition that does not have what government,Code page also is Microsoft only of this company make a way.As programmer,We should know they are what thing only,Without textual research of necessary and overmuch ground these nouns.

Alleged code page (the character that Code Page) is aimed at character of a kind of language namely codes.For example the Code Page of GBK is CP936,The Code Page of BIG5 is CP950,The Code Page of GB2312 is CP20936.

The idea that there is default code page in Windows,Be short of spare namely what encode will explain character.For example the notebook of Windows opened file of a text,The content inside is word reduce expenditure:BA, BA, D7, D6.How Windows should explain it?

It is according to Unicode encode explains, still explain according to GBK, still explain according to BIG5,Still explain according to ISO8859-1?If press GBK to explain,Can get " Chinese character " two words.According to other encode explanation,The character that cannot find correspondence possibly,The character that finds an error possibly also.Alleged " mistake " it is to show the original idea with text author nots agree with,Generated random code at this moment.

The answer is Windows go explaining the byte in text file flows according to current default code page.Default code page can be installed through the area option of Control Panel.Of notebook put additionally there is an ANSI in be,It is the encode method according to default code page is saved actually.

The internal code of Windows is Unicode,It can support many code page at the same time on the technology.Want a file to be able to explain what he uses to code only,The code page that the user installed correspondence again,Windows can show correctly,Can appoint Charset in HTML file for example.

Some HTML file authors,Especially English author,Think the everybody on the world uses English,Do not appoint Charset in the file.If he used the character between 0x80-0xff,Chinese Windows according to default GBK goes explaining,Can appear to be piled up in disorder.Want to impose the sentence that appoints Charset in this Html file only at this moment,For example:
%26lt;meta Http-equiv=%26quot;Content-Type%26quot; Content=%26quot;text/html; Charset=ISO8859-1%26quot;%26gt;
If former writer is used code page and ISO8859-1 are compatible,Won't appear to be piled up in disorder.

Say a division again code,Ah area the code is 1601,Write into 16 into making is 0x10, 0x01.The ASCII code that this and computer use extensively conflicts.For the ASCII encode of compatible 00-7f,We are in area A0 is added respectively on the tall, low byte of the code.Such " ah " encode becomes B0A1.We also call the encode that has added two A0 GB2312 to code,Although of GB2312 textual and essential did not mention this.

...

IIS of the installation below Win2K configures Asp+cgi+php+mysql

? ? installs Win2K, install IIS, among them Indexing Service, frontPage 2000 Server Extensions, internet Service Manager (HTML) this a few individual outfit,Still have other a few,Anyhow unused is not installed.(According to safe principle,Least service + the safety with the smallest attributive the biggest = .Least service + the safety with the smallest attributive the biggest = .

? ? above all,Open Internet government implement (begin- - %26gt; program- - %26gt; management- - %26gt; Internet serves government) if illuminate above what install,The service that there are an acquiescent site and a Smtp inside select acquiescent site,Delete all catalog below its.(By you the Delete on clavier bolts) stop Iis,The simplest method:Begin- - %26gt; move- - %26gt; infiltrate ? of Net Stop Iisadmin chooses Y carriage return (started order is:Net Start W3svc) C dish Inetpub catalog is expunged thoroughly (cutout of the ability after stopping Iis) ,In other dish build a catalog to manage in IIS implement of site of lieutenant general acquiesce advocate the catalog that if you need what limits of authority,catalog points to the list that a moment ago built is OK oneself are built slowly,Need what attributive what to open.

? ? (special attention writes attributive and the attributive of executive program,Not absolutely necessary must not give,Acquiesce is did not give,So you need not study,Ah. . ..

Process of ? ? application is configured:Manage in IIS implement in delete must any useless map besides,Leave ASP, ASA and other the file kind that you need to be used really,(Besides Cgi, php,I of other think you are trashy,Delete Htw, htr, idq, ida... ) do not know to be in which cutout??Method:Open Internet to serve government - %26gt; choice site - %26gt; attribute - %26gt; WWW serves - %26gt; editor - %26gt; advocate catalog - %26gt; configuration - %26gt; applied process map,Begin each cutout next (without what choose completely,True trouble) .Be in then just the applied process of that window is debugged script mistake message instead sends text version inside bookmark (unless you think when ASP makes mistake, the user knows your program / network / database structure) what does wrong text write?Informal you like,Oneself are looked at do.Click when be being exited certainly, did not forget to make fictitious catalog successive the attribute of your set.

? ? to make do increasingly the Cgi flaw scanner of grow in quantity,Still a little skill can consult,Make mistake in HTTP404 Object Not Found of IIS lieutenant general the page is weighed through URL directional to file of a custom-built HTM,Can let at present scanner of flaw of great majority CGI is out of order.The reason is very actually simple,When most CGI scanner is being written to go to the lavatory,It is through examining the HTTP that returns a page code comes to what whether exist judge flaw,For example,Famous IDQ flaw is commonly through taking 1.idq to examine,If return HTTP200,Consider as have this flaw,If return HTTP404 to think,do not have conversely,If you pass URL to make mistake HTTP404,information is weighed directional to HTTP404.htm file,So no matter all scanning put nonexistent flaw to be able to return HTTP200,The CGI scanner of 90% can think your what flaw has,The result covered your true flaw instead,The person that let inbreak is spellbound nowhere does it,Do not have friendly intercourse for individual angle,I still think solid becoming very safe setting is more important than such little skill much.

The Zhang order security of ? ? Win2000 is another key,Above all,The acquiescent installation of Win2000 allows any users to get a system through empty user all Zhang date / share list,This is for what user of convenient local area network shares a file originally,But the user list that a long-range user also can get you uses violent law to break solution user code.A lot of friends know to be able to register watch Local_Machine\System\CurrentControlSet\Control\LSA-RestrictAnonymous = 1 to prohibit through changing 139 sky join,This locality safety of Win2000 is actually politic (if be region server,be namely in region server safety and region safety strategy) have such option RestrictAnonymous (faceless connective is additional limitation) ,This option has three values:

? ? 0:None. Rely On Default Permissions (without,Depend on acquiescent attributive)

? ? 1:Do Not Allow Enumeration Of SAM Accounts And Shares (do not allow enumerate SAM account and share)

? ? 2:No Access Without Explicit Anonymous Permissions (do not allow a visit without explicit and faceless attributive)

? ? is worth be systematic acquiesce this 0,What limitation is done not have,Long-range user can know you information of all Zhang date on the machine, group, share catalog, network to transmit list (NetServerTransportEnum is waited a moment,To the server such setting is breakneck.

? ? is worth this 1 is to allow to be not NULL user to access SAM Zhang date only information and share information.

? ? is worth this 2 is in what just support in Win2000,Those who need an attention is,If once you used this value,Your shared estimation to be finished entirely,So I recommend you or set for 1 better.

? ? became good,The user list that the person that inbreak takes us without method now,Our account is safe... slow,Still having an account at least is to be able to run of the password,This is the Administrator with built-in system,How to do?I change change change,Manage in the computer - %26gt; in user Zhang date right attack Administrator next incognito,It what change is informal to what change you,Want to be able to remember go only.After changing to exceed administrative user name,Still can see in the entry interface of Terminal Service (you had loginned to already remembered oneself) ,Modification method:Moving Regedit,Find HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\winlogon medium Don't Display Last User Name strings together data to change 1,Such systems won't show automatically last entry user name.

? ? for safety,You still can open TCP/IP to choose,On the desktop right attack the neighbour on the net - %26gt; attribute - %26gt; right the net that attacks you to want configuration gets stuck - %26gt; attribute - %26gt; TCP/IP-%26gt; is advanced - %26gt; option - %26gt; TCP/IP filters,There are three filters here,It is respectively:TCP port, UDP port and port of IP agreement TCP,Click " to allow " only,The port that adds you to need below next,Generally speaking WEB server needs 80(www) only,FTP server needs 20(FTP Data) ,21(FTP Control) ,3306(Mysql) ,3389(long-range terminal is controlled, if your lead plane is mandatory,be in others computer room, cannot direct * is made, need this) mail server may need to open 25(SMTP) , 110(POP3) ,I did not study to port,But if take the service that article place provides,You should open above only a few went.(80,20,21,25,3306,3389)

? ?- - Cgi support

? ? downloads Activeperl (to be able to download latest edition to Www.perl.com)

? ? 1, solution is pressed,Moving Install.exe,Acquiesce is installation in C:\Below PERL,Nevertheless to go to the lavatory,Had better install C:\ pleaseBelow USR catalog,(The way that writes Perl interpreter so can use # directly! / Usr/bin/perl,Can maintain stand-alone environment and network environment method to agree.Y is pressed all the way when installation can.Y is pressed all the way when installation can.

? ? 2, after installation is fine,According to below three steps will revise register a watch:Moving RegEdit,Search for: Name of HKEY_LOCAL_MACHINE\System\Currentcontrlset\Services\W3svc\Parameters\scriptMap\ key,

? ? adds key name next:".cgi" ,Key is worth:"C:\USR\BIN\perl.exe %s %s" and key name:".pl" ,Key is worth:"C:\USR\BIN\perl.exe %s %s "

? ? (do not know build?So:Inside the casing of right---%26gt; nod right key---%26gt; build- - %26gt; .cgi of instead of name of string value ? , doubleclick this key to be able to input numeric data,Namely above saying key is worth)

Because ? ? wants to let this lead plane support Php,Add here incidentally so on the support of Php and Php3 (when building a site later but save trouble)

? ? adds key name ".php" ,Key is worth:"C:\Php\php.exe %s %s "

? ? adds key name ".php3" ,Key is worth:"C:\Php\php.exe %s %s "

? ? OK,After restarting namely become effective!Cgi support is done calm! After building a site later,The support that acquiesces to be able to add Php and Cgi inside applied process configuration (if giving this limits of authority, be expunged even if) .

Support of ? ? Cgi is done calm!

? ?

? ?- - Mysql support

? ? downloads Mysql (to be able to download newest version to Www.mysql.com)

? ? 1, solution is pressed,Moving Setup.exe is installed completely,Acquiescent installation method is: C: \Mysql;

? ? 2, after installation is finished,Open " begin " in pushbutton " move " ,The input commands:C:\Mysql\bin\mysqld-nt.exe- - Install,Carry out;

? ? 3, begin- - %26gt; program- - %26gt; manage a tool- - %26gt; service- - %26gt; find Mysql- - %26gt; start it;

? ? 4, Mysql installation is finished,Restart Win2000

? ? 5, C:\ is opened after restartingMysql\bin\winmysqladmin.exe,When using it for the first time,Need establishs manager name and code,Install user name and password respectively,After set,Systematic tray can appear " traffic light " small icon (when the system is started, all meet later automatic to load) .?

? ? 6, OK,Mysql support is done calm!

? ?

? ?- - Php support

? ? downloads PHP (to be able to download newest version to Www.php.com)

? ? 1, Php 4.0.4 solution overwhelms C:\Php;

? ? 2, the Php.ini-dist document inside PHP catalog the copy reachs inside WinNT catalog,Incognito for Php.ini;(The configuration file that this is Php,Need not change can move,I do not have careful research)

? ? 3, according to needing to modify content of Php.ini file,If want to use Session function,Build C:\ pleaseTmp catalog,Make the value setting of the Session.save_path inside Php.ini documentation absolutely way:C:/tmp;

? ? 4, duplicate the Php4ts.dll file inside PHP catalog inside WinNt\System32 catalog;

? ? 5, the management in Control Panel is started in the tool " Internet serves government implement " (IIS) ;

? ? 6, open site property,Choose in 'ISAPI implement in ' option, increase new filtration implement,Serve as with 'PHP' choose implement name, in " executable file " Php4isapi.dll and its way are written in column (C:\Php\sapi\php4isapi.dll) .

? ? 7, in the option of " documentation " of attribute " enables acquiescent documentation " to join "index.php" ;

...

Mysql defines function oneself

Former post and discuss:Http://bbs.bccn.net/thread-97486-1-1.html

By JiangMiao 2006-10-19 [is achieved formerly]

Mysql is two kinds from definition function cent
1.Be like the function related String simply
2.Aggregate Aggregate, be like Sum function
Found the Mysql command of function
RETURNS {STRING of name of function of CREATE [AGGREGATE] FUNCTION | INTEGER | REAL | DECIMAL}
SONAME links the name of the library

Note:
1. links a library to appear to cannot lead way
2.aggregate is gather

Type
Description

STRINGChar *

INTEGER
64 Int, __int64, unsigned __int64

REALDouble

DECIAML
Had not finished, char*

...

Example explains the inquiry of MYSQL database to optimize a technology

The core that database system is a management information system,The online general affairs that is based on a database is handled (OLTP) and online analysis is handled (OLAP) is one of computer application with the most significant section such as bank, enterprise, government.From the point of the applied example of most system,The proportion that in inquiring the operation is operated in all sorts of databases, holds is the largest,And the SELECT statement that inquires the operation is based on is in SQL statement is the statement with the biggest cost.E.g. ,If the quantity of data accumulates certain level,Than the account database that is like a bank watch information accumulates about a hundred ten thousand very consummate ten million record,Complete list scanning often needs number ten minutes,Count a hour even.If use better than expressing scanning completely inquiry strategy,Often can make inquire time falls for a few minutes,The value that this shows inquiry optimizes a technology.

The author discovers in applying a purpose to carry out,A lot of programmer are using database of a few front to develop a tool (wait like PowerBuilder, Delphi) when developing database application program,What pay attention to user interface only is luxuriant,The efficiency problem of statement of ask of not heavy inspection,The applied system efficiency that brings about a development to come out is low,Resource is wasteful and serious.Because of this,It how design efficient and reasonable inquiry statement to appear special is important to how design efficient and reasonable inquiry statement to appear special.The article is a foundation with using example,Combinative database is academic,Introductory inquiry optimizes a technology to be applied mediumly in actual system.

Analytic problem

A lot of programmer think inquiry is optimized is DBMS (database management system) the task,The SQL statement concern that writes with programmer place is not big,This is wrong.A good inquiry plan often can make program function increases number decuple.The gather that inquires the plan is the SQL statement that user place submits,Inquiring a program is the statement rally that after the course optimizes processing, produces.The course that DBMS processing inquiry plans is such:In finish after the accidence that inquires a statement, syntactic examination,The inquiry that submits the statement DBMS is optimized implement,Optimize implement finish to algebra is optimized and access method after optimizing,By compile module to undertake handle and be generatinged inquiring planning to the statement beforehand,Refer systematic processing to carry out in right time next,Return executive result the user finally.In real database product (wait like Oracle, Sybase) it is to use those who be based on cost to optimize a method in tall version,This kind optimizes the cost that can reckon according to expressing gets information from systematic dictionary different inquiry plans,Choose next relatively the program of actor.Although present database product optimizes a respect in inquiry,had done weller and weller,But the SQL statement that submits by the user is the foundation that the system optimizes,After very bad tentative idea inquires those who plan to pass a system badly to optimize originally, can become efficient,The actor bad that writes a sentence because of this user place is crucial.Systematic place does inquiry to optimize our of short duration not to discuss,The solution that key specification improves an user to inquire a plan below.

Solve a problem

It is with Informix of relation database system below exemple,The method that the introduction improves an user to inquire a plan.

1 .Reasonable use index

Index is the important data structure in the database,Its primary purpose inquires efficiency to rise namely.Most now database product uses IBM most the ISAM index structure that offers first.The use of index wants proper,Its use a principle to be as follows:

? often is having link,But did not appoint to index is built on the row of external key,And not often connective field criterion by optimize implement make reference automatically.

? is having sort often or in group (undertake Group By or Order By are operated namely) index is built on the row.

The different value that ? often uses in conditional expression is built on more line retrieve,Do not build index on the train with different little value.Express in employee for instance " sexual distinction " have only on the row " male " with " female " two different values,Because this is not had necessary build index.If build index not only won't improve inquiry efficiency,Can lower newer rate badly instead.

If ? waits for the row of sort to have many,Composite index can be built on these rows (Compound Index) .

? uses systematic tool.If Informix database has tool of a Tbcheck,Can undertake checking on doubtful index.On server of a few databases,Index is likely invalidation perhaps makes because of frequent operation read take loss of efficiency,If the inquiry of an use index is unidentified not white ground is slow come down,The integrality that can try to check reference with Tbcheck tool,Have repair when necessary.Additional,After the database expresses newer mass data,Delete and rebuild index can raise inquiry rate.

2 .Avoid or simplify sort

Ought to simplify or avoid to have reduplicative sort to large watch.When can use index to generate output automatically with proper order,Optimize implement the measure that avoided sort.It is a few influencing factor below:

One does not include in ? index or a few kinds that need sort;

The order of the order that ? arranges in Group By or Order By clause and index is different;

The row of ? sort comes from diverse list.

To avoid needless sort,Be about to be added correctly construct index,Incorporate reasonably the database is expressed (although may affect the standardization of the watch sometimes,But opposite at efficiency rising is worthiness) .If sort is inevitable,Ought to try to simplify so it,The limits of the row that is like contractible sort.

3 .Eliminate the order that occupies to large watch linage to access

In nest inquiry,Access pair of inquiry efficiency to may produce deadly effect to the order of the watch.Use order to access strategy for instance,A nest 3 inquiry,If every inquire 1000,So this inquiry is about to inquire 1 billion linage is occupied.The main method that prevents this kind of situation is opposite namely connective row has index.For example,Two watches:The student is expressed (learn date, full name, age... ) and choose school timetable (learn date, course date, result) .If two watches want to make connection,Be about to be in " learn name " index is built on this join field.

Still can be used and part will avoid to be accessed orderly.Although be in,all examinations have index on the row,But the Where clause of certain form forces to optimize implement use order is accessed.The inquiry below will force to express executive order to operate to Orders:

FROM Orders WHERE (customer_num=104 AND Order_num%26gt;1001) OR Order_num=1008 of SELECT *

Although be built on Customer_num and Order_num,have index,But optimize in above statement implement still use order to access method to scan whole watch.The gather that what should retrieve because of this statement is detached travel,So should instead is as follows statement:

FROM Orders WHERE Customer_num=104 AND Order_num%26gt;1001 of SELECT *

UNION

FROM Orders WHERE Order_num=1008 of SELECT *

Can use index method to handle inquiry so.

4 .Avoid relevant child inquiry

The label of a row is in at the same time advocate inquire and appear in the inquiry in Where clause,Become so probably advocate after inquiring medium row is worth a change,Child inquiry must inquire afresh.Inquiry nest administrative levels is more,Efficiency is lower,Ought to avoid as far as possible accordingly child inquiry.If fruit inquiry is inevitable,Should be in so child filter to go more as far as possible in inquiry.

5 .Avoid difficult standard expression

MATCHES and support of LIKE key word are connected match accord with to match,Standard expression makes on the technology.But this kind matchs extraordinary waste time to expend time.For example:FROM Customer WHERE Zipcode LIKE of SELECT * " 98_ _ _ "

Although was built on Zipcode field,index,The means that still also uses ordinal scanning below this kind of circumstance.If FROM Customer WHERE Zipcode %26gt; of * of statement instead SELECT %26quot; 98000 %26quot; ,Can use index to inquire when executive inquiry,Apparent meeting raises rate greatly.

Additional,Avoid those who begin to be not even child string.For example statement:FROM Customer WHERE Zipcode[2 of SELECT * ,3]%26gt; %26quot; 80 %26quot; ,Used in Where clause blame begin child string,Consequently this statement also won't use index.

6 .Use express temporarily quicken inquiry

Have sort and found a subclass of the watch express temporarily,Can inquire quickly sometimes.It conduces to avoid multiple sort to operate,And still can simplify in other side optimize implement the job.For example:

SELECT Cust.name,Rcvbles.balance,... Other Columns

FROM Cust,Rcvbles

WHERE Cust.customer_id = Rcvlbes.customer_id

AND Rcvblls.balance%26gt;0

AND Cust.postcode%26gt; %26quot; 98000 %26quot;

ORDER BY Cust.name

If this inquiry wants,be carried out for many times and more than,Can seek all unpaid clients to be put in temporarily in the file,The name that presses a client has sort:

SELECT Cust.name,Rcvbles.balance,... Other Columns

FROM Cust,Rcvbles

WHERE Cust.customer_id = Rcvlbes.customer_id

AND Rcvblls.balance%26gt;0

ORDER BY Cust.name

INTO TEMP Cust_with_balance

Inquire in be expressed temporarily with the means below next:

FROM Cust_with_balance of SELECT *

WHERE Postcode%26gt; %26quot; 98000 %26quot;

The travel in be being expressed temporarily should be compared advocate the travel in the watch is little,And the order that physical order asks namely,Reduced disk I/O,So inquiry workload can get decreasing considerably.

Notice:After the watch is founded, won't mirror temporarily advocate the modification of the watch.Be in advocate below the condition that the data in the watch alters often,The attention does not lose data.

...

Eclipse+JBoss+MySQL develops an environment to set whole strategy

J2EE is very good.As development environment,If use classical configuration:JBuilder+Weblogic+Oracle,Naturally handy,But the price is breathtaking.This configuration basically is to be aimed at large or exceed large applying,Hardware demand is very high also,Show in the light of what home gives priority to with medium or small applying besides,Do not make recommend.

Although domestic developer is used to already,But the author thinks still is a nip in the bud,Should join OpenSource procession as early as possible,The development of industry of stimulative home software.

The Eclipse that article place recommends, JBoss, MySQL all is the software opening a source with very high repute,And very practical.

1, JDK:To Http://java.sun.com download,Recommend use J2SDK1.4.X

2, JBoss:To Http://www.jboss.org download,The author uses Jboss-3.0.4_tomcat-4.0.6

3, MySQL:To Http://www.mysql.com download,The author uses Mysql-4.0.13,Graph of MySQL Control Center(of additional beard download turns administrative tool) ,To the JDBC driver of Http://sourceforge.net/projects/mmmysql/ download MySQL,Be like Mm.mysql-2.0.14-you-must-unjar-me.jar

4, Eclipse:To Http://www.eclipse.org download,Newest version is 3.0M8,If be download of Jian of new hand push 2.1.2 wrap with Chinese (2.1.2_Translations) .To Http://www.objectlearn.com/ download Lomboz(J2EE of development of this plug-in unit needs) ,The version that those who need an attention is Lomboz must agree with Eclipse version,Otherwise abnormal.

The environment is installed (issue D with Windows 2000 dish the catalog that make a root is exemple) :

1, the installation configuration of JDK explains no longer here.

2, JBoss solution overwhelms D:\,The Mm.mysql-2.0.14-bin.jar solution in wrapping the JDBC drive Cheng of MySQL overwhelms D:\In Jboss-3.0.4_tomcat-4.0.6\server\default\lib,Again D:\The Mysql-service.xml below Jboss-3.0.4_tomcat-4.0.6\docs\examples\jca catalog copies D:\Below Jboss-3.0.4_tomcat-4.0.6\server\default\deploy catalog,Find corresponding paragraph and make following modification:


...
« 首页...« 8 9 10 11 12 13 14 15 16 17 18 19 20 21 »...尾页 »