Feed on
Subscription

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:


...

MySQL database safety configures a guideline

1, introductive

MySQL is complete network cross system of platform relation database,It is to have client computer at the same time / the system of distributed database management of server architecture.It has a function strong, use handy, government convenient, traversal speed sex of fast, on the safe side is strong wait for an advantage,The program that the user can use a lot of languages to write visit MySQL database,Especially with PHP it is gold combination more,Apply very extensive.

Because MySQL is the database of much platform,Its acquiescent configuration should consider all sorts of circumstances to fall can applicable,Should undertake farther safe consolidate below the use environment of ourselves so.As the systematic manager of a MySQL,We are responsible the data security that maintains MySQL database system and integrality.

The safety of MySQL database is configured must from two respects proceed with,Systematic interior safety and exterior network safety,A few issues that the attention wants when additionally we still will introduce process designing simply and a few small doohickey.

2, systematic interior is safe

Introduce structure of MySQL database catalog simply above all.MySQL has been installed,Data catalog and initialization database can be built after running Mysql_db_install scenario.If we use MySQL source,the bag is installed,And installation catalog is / Usr/local/mysql,So data catalog can be commonly / Usr/local/mysql/var.Database system is comprised by a series of databases,Every database includes a series of databases to express.MySQL is to use database name to be built in data catalog build list of a database,Each database is expressed express master with the database respectively for file name,Three files that expand v/arc a person's status is not MYD, MYI, Frm are put in database catalog.

The accredit watch of MySQL offerred agile attributive to control to the visit of the database,But if this locality user is had to the reads attributive word of library file,Aggressor needs to bale database catalog only beat goes,Next beat arrives the database that oneself can visit filch below the data catalog of this machine.The security of the lead plane that so MySQL is in is the firstest issue,If lead plane is insecure,By aggressor control,So the security of MySQL also have no way is mentioned.The security that is data catalog and data file next,Namely attributive sets an issue.

From MySQL advocate station a few old Binary are issued in light of edition,The attribute of catalog of the data in 3.21.xx version is 775,So breakneck,Any this locality users can read data list,Database file is very so insecure.The attribute of catalog of the data in 3.22.xx version is 770,This kind of attribute is a little dangerous also,Of this locality can read already with group user also can write,Data file is so insecure also.The attribute of catalog of 3.23.xx version data is 700,Had compared so,The user that starts a database only can be read keep database file,The safety that assured file of this locality data.

If start the user of MySQL database,be Mysql,So those who resemble the catalog that be as follows and file is safe,Note data catalog and the attribute below please:
Shell%26gt;ls -l /usr/local/mysql
Total 40
Drwxrwxr-x 2 Root Root 4096 Feb 27 20:07 Bin
Drwxrwxr-x 3 Root Root 4096 Feb 27 20:07 Include
Drwxrwxr-x 2 Root Root 4096 Feb 27 20:07 Info
Drwxrwxr-x 3 Root Root 4096 Feb 27 20:07 Lib
Drwxrwxr-x 2 Root Root 4096 Feb 27 20:07 Libexec
Drwxrwxr-x 3 Root Root 4096 Feb 27 20:07 Man
Drwxrwxr-x 6 Root Root 4096 Feb 27 20:07 Mysql-test
Drwxrwxr-x 3 Root Root 4096 Feb 27 20:07 Share
Drwxrwxr-x 7 Root Root 4096 Feb 27 20:07 Sql-bench
Drwx------4 Mysql Mysql 4096 Feb 27 20:07 Var
Shell%26gt;ls -l /usr/local/mysql/var
Total 8
Drwx------2 Mysql Mysql 4096 Feb 27 20:08 Mysql
Drwx------2 Mysql Mysql 4096 Feb 27 20:08 Test
Shell%26gt;ls -l /usr/local/mysql/var/mysql
Total 104

- Rw-------1 Mysql Mysql 0 Feb 27 20:08 Columns_priv.MYD

- Rw-------1 Mysql Mysql 1024 Feb 27 20:08 Columns_priv.MYI

- Rw-------1 Mysql Mysql 8778 Feb 27 20:08 Columns_priv.frm

- Rw-------1 Mysql Mysql 302 Feb 27 20:08 Db.MYD

- Rw-------1 Mysql Mysql 3072 Feb 27 20:08 Db.MYI

- Rw-------1 Mysql Mysql 8982 Feb 27 20:08 Db.frm

- Rw-------1 Mysql Mysql 0 Feb 27 20:08 Func.MYD

- Rw-------1 Mysql Mysql 1024 Feb 27 20:08 Func.MYI

- Rw-------1 Mysql Mysql 8641 Feb 27 20:08 Func.frm

- Rw-------1 Mysql Mysql 0 Feb 27 20:08 Host.MYD

- Rw-------1 Mysql Mysql 1024 Feb 27 20:08 Host.MYI

- Rw-------1 Mysql Mysql 8958 Feb 27 20:08 Host.frm

- Rw-------1 Mysql Mysql 0 Feb 27 20:08 Tables_priv.MYD

- Rw-------1 Mysql Mysql 1024 Feb 27 20:08 Tables_priv.MYI

- Rw-------1 Mysql Mysql 8877 Feb 27 20:08 Tables_priv.frm

- Rw-------1 Mysql Mysql 428 Feb 27 20:08 User.MYD

- Rw-------1 Mysql Mysql 2048 Feb 27 20:08 User.MYI

- Rw-------1 Mysql Mysql 9148 Feb 27 20:08 User.frm

If of these files belong to advocate reaching attribute is not such,Those who ask below in order to two commands to amend:
Shell%26gt;chown -R Mysql.mysql /usr/local/mysql/var
Shell%26gt;chmod -R Go-rwx /usr/local/mysql/var

Using Root user to start long-distance service is safety big fear all the time,Because if serve a program,appear problem,The complete control that long-range aggressor gains lead plane extremely likely counterpoises.MySQL was made in the begining from 3.23.15 version alter smally,The service after acquiescent installation should be started with Mysql user,Do not allow Root user to start.If must use Root user to start,Must add- - the parameter (of User=root. / Safe_mysqld- - User=root %26amp;) .Because there are LOAD DATA INFILE and SELECT in MySQL. . . The SQL statement of INTO OUTFILE,If be Root user,started MySQL server,So,Database user writes attributive with respect to what had Root user.Do not cross MySQL or did a few restriction,For instance LOAD DATA INFILE can read the document with readable overall situation only,SELECT. . . INTO OUTFILE cannot enclothe the file that has existed.

The log file of this locality also cannot be ignored,The daily record that includes the log of Shell and him MySQL.Some users are landed in this locality or backup database when to pursue convenient,Meet sometimes in the code that the database carried directly in command travel parameter,Be like:
Shell%26gt;/usr/local/mysql/bin/mysqldump -uroot -ptest Test%26gt;test.sql
Shell%26gt;/usr/local/mysql/bin/mysql -uroot -ptest

These commands can be recorded by Shell in historical file,The.bash_history file that for instance Bash can keep user list,If these files are inadvertent,be read,So the password of the database is met leak.The SQL order that after the user lands a database, executes also can be recorded to be in the.mysql_history file of user catalog by MySQL.If database user used SQL statement to amend database code,Also meet because of.mysql_history file leak.So we are landed in Shell when reaching backup, not be in - the password is added directly after P,It is however after clew reintroduce database password.

Additionally we also should not allow these two documents the operation that it records us,Be ready for any eventuality.
Shell%26gt;rm.bash_history.mysql_history
Shell%26gt;ln -s /dev/null.bash_history
Shell%26gt;ln -s /dev/null.mysql_history

Come these two commands receive catenary of these two files / Dev/null,So our operation won't be gone to by the record in these two files.

...

MYSQL database abecedarian uses a guideline

Although had installed Mysql,have a lot of friends but do not know how to use it however.In this article we from the join MYSQL, modification password, commonly used order that increases the respect such as the user to learn a few MYSQL.

One, join MYSQL.

Format:




















...

MySQL Admin

MySQL Command Line
If you are an old-school programmer that has no need for a graphical user interface, then you can simply use any command line interface to execute MySQL queries.

Those of you with MySQL installed on your Microsoft Windows operating system can reach the command line by going to the Start Menu and choosing "Run...". Type the keyword "cmd" into the text field and press Enter to launch Window's command line interface.
...

MySQL Setup Guide

Although you can set up MySQL manually on your home PC, it can be rather difficult for a beginner to do, and would require more than a few lessons! If you think you've got what it takes, or you're just mentally unstable, head on over to MySQL.com for more information on installing MySQL yourself.
...

Starting MySQL

Before starting the MySQL client make sure the server is turned on. If you run Windows 9x start the mysqld.exe or if you run Windows 2000/XP run the mysqld-nt.exe

title

The --console option tells mysqld-nt not to remove the console window. if you are running Windows NT/2000/XP it's better to install MySQL as a service. That way mysql server will be automatically started when you start Windows.
...
« 首页...« 1 2 3 4 5 6 7 8 9»...尾页 »