Tuesday, July 31, 2012

Hacker (Hacker) classification of the skills




Hackers?
- Programming languages ​​and systems who enjoys learning the details of

- Rather than merely theorized about programming and people who enjoy the programming itself

- Specialty, who would quickly write a program that

- An expert on a particular program

This article about doing so, he eonronmaechena hacker underground drifting through the following terms sum up to the classification of hacker silryeokbyeol.

1) The Elite
3133t, 31337, 3 also known as 337 l. Security at the forefront of the industry does not limit the ability of these. Compared to other industries to keep getting older and is characterized by mature level. Inside and outside of the operating system they are obliged to see through. Programming is the default.

The wheels are great natural talent.
Due to the nature of the security of these are engaged in the security industry and the very few, who works at the data input or the help desk, which is dirty.
An endless thirst for knowledge and curiosity got them to decide what success and failure factors.
"This code is run as a user other than root I would spark a segmentation fault," you have any questions for this kind of solution to try and try until you find.
 Elite hackers by applying the knowledge it takes to make their fix in mind, and how to fix to improve the environment. If you discover a vulnerability in the operating system or software vulnerabilities sit down and trace the origin and cause, and sometimes also discover a possible solution produces.
Means of a highly skilled technique and as required, would have in order not to get caught. Elite hackers out of the system to be hacked without a trace.
The technology never even know that he's been hacked so close to amazing.
 The reason for this is simple to make this hack. They can penetrate a system and then leave quietly geotppun want to prove that. Therefore, only data that can be traced to clear the rest of the other data do not touch.
They'll try and download the entire network can throw and make the system disables the ability to infiltrate the recovery hold the owner of the two.
However, they do not. Because the elite because.

2) semi-elite
Their age is slightly lower than the previous elite hackers side.
Have comprehensive knowledge about the computer, it does so to understand the system and
It does so in a particular vulnerability known to exist, its vulnerability to attack exploits a minimal degree of coding are armed with knowledge.
Most of the hacking incidents reported in the media of this sort is due to a hacker.
They themselves because of the talent wants to naeboyigo receives glare of elite hackers.
From the perspective of elite hackers because it's stupid jityigi. Their technology is the lack of being a elite level. After cracking a huge amount of logs and system administrators often leave a trail to nail caught are arrested.

3) Kiddy Loft Developments
Young ages, they usually consist of ten students in the second half.
They read many books about hacking techniques, the techniques you know where you want to use. It worked exploits a vulnerability found ten thousand and one times until you try to penetrate a system, if successful, usually (consciously or unconsciously) losing control of the system is destroyed.
Then they keep telling the act of boasting dongnebangne. Of these, the hacker to gain the title, but most keuraekeora referred to some of Ido.
Or newly discovered security vulnerabilities, according to a recently discovered vulnerability in a given situation for those who have skills that will change.
If you need to mobilize services and knowledge of the net, but there is no King of the GUI based operating systems other than the high-level operating system does not have a basic knowledge.
Unix has just started or is the mere foundation, if you know the most. They do not know the track well Prevention. Usually at home, dial-up accounts using stolen is cracking.
After a successful network penetration and carries everywhere proud. This level credit card fraud, warez (pirated software term) bootleg, nuking, DoS, etc. are involved in such a serious computer crime. To justice is deservedly.
 When a society is bound to assess how their own sins, how will you realize just how making a strict punishment. Cracking usually quit after a life sentence.

4) The script kiddies
Loft Developments kiddies and Ray Price in the middle of bots, script kiddies have all the features of both.
 They absolutely do not get the title of hacker. Newokingyina little about the operating system, scores of technical knowledge gojakin GUI operating system to the outside world, they have never been in his Iife.
They are used for warez computer knowledge. They have to hack usually use well-known Trojan attack and harass ordinary Internet users will
 Ray script kiddies and bots, and some knowledge of the difference is age. Most of these computers as a student teacher in class, do not know if you ask them.
Because of these lower-level students, and they look up at the elite level, is mistaken.

5) reyimeo
Hackers and technology but also those who are experienced. Under no circumstances should these hackers that called you. Keuraekeora should call.
These networks and operating systems do not have knowledge regarding gisuljeokeuin. The sole purpose of using these computer games and IRC chat. Warez sites to find or include credit card fraud.
 Through mass media such as newspapers, magazines heard of hackers learn that they deluded themselves into the elite is in a false sense of superiority.
 Trojan software, nuking, DoS tool you can if you think about the fact that cracking Trojans and hacking the GUI operating systems are down.
The superiority of the same sort of would-be hackers, the same situation, the same level affects the others.
I mean they are an IRC and Internet communications to spread through space, and this cycle is repeated.
For the majority of them climb into the elite level of technical skills are lacking. Years studying and using the computer even if trained, the developmental level loft kiddies will retire in repose.

Boot: The audible alarm the fault condition know as




Q: As you know failure alarm
         If AMI BIOS
           Resolution number of beeps
             No. 1: normal
             2: parity check fails, the memory problem memory socket memory again or bad or kkot
             3: Check the default memory failure Bad motherboard's main board, the A / S confirmed
             4: System timer failure The main board more than a backup battery
             5: Processor Error The CPU-related check the connection status, and lower the clock speed or replace
             6: The keyboard controller connection status check fails, the input device error kibodeugyochena
                    Gate A20 failure or
             No. 7: The processor supports the processor in the BIOS interrupt error or bad hajimot
             8: Check or replace the graphics card graphics memory error
             No. 9: Check the BIOS ROM BIOS setup and re-check error logs
             No. 10: Shimo-off read / write failure Bad motherboard is replaced, or A / S
             11: Bad CPU's L2 cache, the cache memory failure or not recognized correctly
                                                          If you set up the gun off in the BIOS Features Setup Menu
                                                          CPU Level 2 Cachc item is set to Disabled
             Ssayireneum: CPU overheating, the CPU replacement kulreogyochena Status Severity
                                                                 
                                                                       
         If AWARD BIOS
           Resolution number of beeps
             Short a time: normal
             Short 2: nonfatal error on the screen when the BIOS settings are correct, the error
                                                           If the message ttarahamyeondoem
             Short 3: Check the status of the keyboard controller error kibodeugyochena connection
             Hold a beonjjalge 1: Motherboard error Unknown error re-assemble the main board
             Hold a beonjjalge 2: Graphic card error reinstall or replace the graphics card
             Hold a beonjjalge 3:,,,,
             Come up with any alarm system without a power failure or CPU namemoriuibulryangyimeuro
             If it does not appear on the screen: the main board A / S get or replace
             Continuous beeps: System Error Motherboard A / S, or verify that the parts are installed correctly

LTE (Long Term Evolution)




■ Concept

Stands for Long Term Evolution 4G (G) as a third-generation mobile communication services mobile communications (3G) technology means long-term evolution of the name in the attached

* Current download speeds of up to 173Mbps LTE level since the third generation of mobile communications and 4G mobile communication technology means that in the middle of a 3.9-generation mobile communications (3.9G) should be classified as
 
■ LTE introduction of the

Network load as well as alleviate the problem significantly improve data transfer speeds, large capacity hard to implement the existing mobile communications include online games, download high-definition video in real time, three-dimensional imaging and other services possible, Jim Hall

Phone subscribers surpassed 20 million people and half of them join the carrier's unlimited data plan, as the explosion of traffic and slow down the third-generation mobile networks
 
■ rate level

Data transfer rate increased by more than five times the current 3G guard

Download speeds up to 173Mbps * 700MB capacity of a section of the movie available for download within one minute

* Mbps (Mega bit per second): 1 million bits per second transfer rate that can be sent to
 
■ Future

2013 download speed 1Gbps (Giga bit per second), 500Mbps upload speeds expected to improve to the level
 
■ Related Trends

LTE is gaining interest for the users that are visible symptoms, such as subscriber-tip LTE emerged as the national carrier of the competition area

Monday, July 30, 2012

10 ways to reduce electricity bills computer




A. When you turn on your computer, turn on the body by in about one minute after turning on the monitor Make a habit.

Most people turn on the monitor powering thse body, frankly, see the monitor In the process of booting There is not anything? Furthermore, the monitor power consuming 60-70% of the total computer power rapnida.


Two. When you write a computer monitor only kkeodupsida not wait.

've Eaten a lot of electricity monitor kkeodwodo computer monitor only 50% more power saving.


Three. If you want to spend no more than 30 minutes on the computer ripsida turn off your computer.

Once the computer is turned approximately 20-30 minutes to hours of use may have to kill the power.


Four. Let's use the power saving mode.

Start - Settings - Control Panel - Display - Screen Saver - Power] go automatically after a specified time when you turn off your monitor and hard disk is recommended. I'll put them on 10 minutes and 1 hour respectively. The one hard disk, especially if you continue to do so alone that zing motors are turning. Anyway you shake it like that mouse haenotgo later come back as the original.


5 Printers, speakers, scanners, etc. If he does not turn on only when writing it entirely necessary.

Leave the city, especially those who continue to profe speaker, listening to music or sound effects to lift it off the situation, if not immediately, please. And music is a more significant hearing losses.


6. Let's install a computer in a cool place.

If you leave the computer away from hot to cool the pan, turn more and more
Returns the power loss.


7 The one you do not monitor too bright.

Below you monitor that can adjust the brightness. Please darken as moderate. The monitor screen is brighter eats a lot of electricity.


Eight. When you turn off your computer, as always all around Please turn all devices.

Off the modem while the computer is usually not as well turn this off gyesipnida people. Please turn it. If you are using a router, the router also try switching it off. Rather they on a power strip printer / speakers / scanner / modem / router, etc. Please plug all. Except for body only. Then get off the body all at once, turn off the power strip switch kkeojigetjyo. Kyeosyeoya from your computer instead of turning it back on again I'm a power strip. Modem before this body because you have Internet access I have to be lit.


Nine. Do not place CDs in the CD-ROM.

If there is a CD in the CD-ROM when you boot cd will turn a blind swiing ~ ~. Therefore, the longer the boot time as well as power dissipation jijyo. Explorer pop up with something like this when you turn it once or swiing ~. Electricity eating time also slow things down. Unplug the CD is unconditional.


10 If the computer off and then shake out all code.

Plugged into the standby power consumption of the code number and is proportional. As a lot of code to take it off is to save electricity. They must start making with the heavy, especially computers a ... multi-code? Pyut? Row, plugging a power strip and get you to pull the cord itself.

Friday, July 27, 2012

My computer program is essential to what?




Looking at each individual's computer is equipped with a variety of programs. Different machines on the street, forced to extract, but this in spite of different environments or tastes in common, and is installed by default, or there's a program that installs.


Today, about its contents jipeo will commence. Sseujalttaegi keomgosuga not look without being tied to age and gender information, but still today, for those who want to learn computer applications for the system to some extent think there is a way to clean up.


Internet Explorer is the most basic program guess. Obviously ... if you install Windows 98 browser version 4.0 is installed. Then Windows 98SE version 5.0, Windows Me, doejyo install the latest version 5.5.


However, this version the user can do the upgrade if necessary. Like a normal program can be installed separately because. Outlook Express and Internet Explorer are associated with the same version because it also should know that this installation.


Windoman fact, your computer will work. However, the absence of limbs is breathing therethrough. Do we have to sit and watch you. So I would need to take advantage of Multimedia Windows Media Player (Window Media Player) is


Of course, this also while installing Windows installation can be done automatically. The new version comes out, but Internet Explorer is available as a free upgrade. From the current state is up to 7.0 ... The features like a bitch, but leads to higher system specifications, the criticism is too sassy.


Nowadays, you have his or her own home have a lot of people. In this case, on your own server, or file upload and manage files, the program used a lot when it is Cute FTP. In the past, ws-ftp was used a lot in terms of functionality or usability of the user's convenience there were many layers. Moreover, there is no time limit viscosity good empathic ...


When the file download via the Internet using the program's. FlashGet is the best out of the program. Before that, GetRight or Go! Zilla and two commonly used FlashGet, but now this is a trend that composure. Words up to 500% which claim to improve download performance.


This communication or files downloaded from the Internet is the most compressed files. Thus, the compressed file is essential to turn off utilities would need. So now the program is gaining momentum created by pure domestic technology aljip (Alzip) is In the past, foreign-compression utility Winzip program, but now known as the epitome of our products make room tojeong is a restaurant. It's desirable.


A degree in computer games is not the computer, the computer does kkalriji (remark too rigid?) This is true. In addition, users do not need to install the game window that because the basic game is installed. Moreover, today's game, their performance is getting better day. So, would require mandatory Direct X (Direct X) Joe. Of course, this also when you install Windows is installed automatically. But even more enhanced safety and an upgrade is required to taste. This is especially true, especially in 3D games. Hangul 8.0 came out from the current compatibility issues with existing peripheral devices There are a lot of sense to.


General Internet communication is still equally there are a lot of people who use. In particular, the more right modem users. If you use this communications company dedicated to providing each communication to communicate using the emulator emulator that can be used in common than is recommended. So it's used in the past 98 or Saerom is deeotamaen. 98 IMF Saerom deyitamaen especially because the free version can be used casually.


Own music or graphics files on your computer, there'd also gradually increased. If you frequently listen to your music Winamp (WinAmp) will use the most. This is because the capacity that is less free. Moreover, these days a lot of music to your computer via CD Rom, because listening is almost essential.


To view the graphics files is a simple graphic viewer (Viewer) has to be in. If you have such a viewer program to turn our bulky graphics program. Nangbijyo indeed. So in this case ACDSee is a lot to be used. Faster and many other features are useful.


Finally, the most important thing .... It is a vaccine program. Cup of gold floating in a warehouse piled treasure, even if the thief just a level others can not be avoided "Take all the treasure of the ~ 'is like. The vaccine program is constantly keeping the V3 stronghold. Nowadays, the V3-Neo for free personal use version is available.

Sharing a printer to my computer properly, how to verify that




So here is a shared network printer to the computer normally, OK, I'll share that? Oh, of course, let the output


However, there is the way to tell each of adherence. So, in a shared machine on 'My Computer' and select again 'Printer' and select a folder.


If the printer control panel if there is no entry in the printer option. You see the shared printer name.


Here on the right mouse button to 'Properties', click So they're going to the printer properties window.


Tab at the top of 'more' - take a look cock. 'Print port' Khan '\ \ computer name \ printer name "has been registered in this way.


For example, a shared computer name 'Dreamnet' and if the HP print '\ \ Dreamnet'hp deskjet6' ... end up in the same way as the expression.


I actually installed the printer on a computer? Yes, normally appears. Normal 'print port' a 'LPT1: (Printer Port) ".... the way


When connecting to certain sites on the Internet, the total set of the error messages




Then an error message comes in many different situations that can often encounter let's examine a typical error message. This information to the user's perspective one step will be to broaden the information.

 
404 Not Found (404 Not Found)

 Jijyo really annoying error messages. Words, the Internet is now called heavy trash is meaningless. It's mostly an empty shell.

These messages appear as shown in the browser window as the title of 'non-existent document (Error 404 Page Not Found)' But there's also a message.

But in this case, if the host is alive only that information is linked to sub-specific file does not exist in most cases is

In this case, enter their address is correct, please check once again.

If you get the same error message but does not give up 'imjeon mutoe' address by typing in the spirit of its parent, please do check.

If that is linked to the file name except the file name, home address, please enter and find data. Each file on the homepage not often reform may change the menu because divergence.



The page can not be displayed.

 Perhaps the above error message is annoying as much as 404 jijyo message. Such as shown in the title bar shows the error message in this for me to try and refresh or network settings, but does not help at all.

And look at the bottom of the 'Can not find server or DNS Error' message looks.

Now, what does it mean that these messages? The main reason is temporarily connected to the server If it does not, and even the worst case scenario, because there is such a server address to see the sky shouting prices.

So the difference between the 404 error and can I find it? And it was already explained. Messages such as the picture above to connect to the server in the state, but only if you can not find page is linked.

But even this guy can not even find a feather, let alone lives to the torso.






Forbidden Error (or 403 Forbidden / Access Denied (403 run / access denied)).

Perhaps of adult membership site that appears most frequently to access the site will jiil mesh. Mean I just do not have permission to access. Of course, when you register and there are no problems with access. But do not carelessly become a member. In particular, the case of foreign sites even easier to join the secession has to struggle. The display of this error is followed by 203 or 403. In item 2 above, as quoted .... 404 In particular, nearly 403 associated with the message that appears is often the mistakes of the Web administrator. Ohryujyo in a message board or guest book set.



HTTP Error - 403.5 Forbidden: SSL 128 required

Nowadays on the Internet for financial services by the user suddenly increased prevailed. Accordingly, many may encounter an error message. Internet banking and shopping malls, especially when using the electronic payment system will appear frequently. In other words, this is a security-related error messages. 'Internet Options' from the 'Advanced' tab, then select 'SSL 2.0 Use' and 'SSL 3.0 Enable' Please check the.



Authorizing Failed!

This message is also the same vein L4. Membership sites that monetize the site, or a non-administrator access to the public in administrative mode if they appear on.



"Site Name" + "can not open the site. Can not connect to server. '

In this case, the address of the site is incorrect or an error that occurs when a message is sent. Once again, attempts ~



Of finding the site + 'site name'

Work under the status bar of the screen with the same message and if the transmission time is prolonged. However, with vain ambition 'Patience + perseverance "to continue to prop up the end saneulhan scandal, will appear blank. Too early to give up a habit that it is important to tell indirectly didactic (?) Is jijyo mesh.



203/Implementation Error

Site exists, but access to the current issue of the server environment is impossible says. Challenges in the future again.


203 Not Found Error

Take that with a lot of ignorance jijyo seeing error messages. At all sites, or that has not yet opened a formal status.



No Route to Host
Communication is disconnected in the middle If it does not connect to the server is Even though it was a shame to re-connection ....



Not Available

A very popular online game, or at certain times, events, or the always crowded you can see on the site often do you Mezieres. Take your time, and then tries to connect to or otherwise 60 times per second (?) Repeated attempts to connect to the lightning, you will be connected within one minute.



Can't Locate Remote Host

Users to find the address of the site were invalid. Entered correctly and try again ~



503 Service Unavailable (503 Service unavailable)

The Web site if the server is overloaded. After a few seconds and try again.



Bad file request (invalid file requests)

Online form, or HTML code may be incorrect.



Connection refused by host (host: Connection refused).

'403 Forbidden / Access Denied 'error and an error message similar to the membership or adult site is the message that appears during authentication.



Failed DNS lookup (DNS search fails)

The URL of the Web site can not be converted into the appropriate IP address is In a commercial site, this error occurs frequently switching IP addresses to computers that are responsible because they are placed into an overload condition. Of course, if you enter the wrong address may also occur. Once again, enter the address to view, congestion will not try again at the same time.



Helper application not found

Secondary application (helper application) would receive the needed files to download, which is Internet Explorer If you do not find it. In this case, no window or opening Windows 'View (V)' the 'Folder Options (O)' in the 'File Types' tab for the secondary application directory and file name must be entered correctly.



Site unavailable (site available)

At the same time when too many people trying to access the site through on-line to the load down (sit hesitation) may be, or does not exist anymore, the site is also possible. If you typed the address incorrectly, can produce.


Thursday, July 26, 2012

The main SQL syntax MySQL




This part is important part of the MySQL manual and you should be aware of all the parts will be organized focusing briefly describes the content is not supposed to. Included in the actual distribution of the large amount of manual boasts more than 600 pages and is made of very alchage. Even in English, but my spare time when you have time to read difficult aneuni will help you a lot. Appendix CD-ROM's / MySQL / manual are included in the original manual.


Four. The main SQL syntax MySQL

▶ CREATE DATABASE

Syntax: CREATE DATABASE db_name

The name given to a new database is created. The available names are mentioned in the first part of this chapter. Ten thousand days of the same name, the database already exists when you get errors. MySQL is a database file to a directory to manage the table just because the database was created, if the table does not exist and is actually the given name of the CREATE DATABASE command is responsible for creating an empty directory.

Also use the mysqladmin utility, you can create a database.
#. / Mysqladmin create school


▶ DROP DATABASE

Syntax: DROP DATABASE [IF EXISTS] db_name

DROP DATABASE given the first drop all tables in the database and the database is deleted. Once again, to recover a deleted because there is no way to be careful with. This command existed in the database directory to tell the number of files typically three times the number of tables that actually exist. This table is an index of the file `. ISD ', which stores the actual data`. ISM' files and the schema of a table (structure) to store `. Frm 'file consists of, because ...

Since version 3.22 from the IF EXISTS keyword was added if the database does not exist is to prevent errors. Of course, also use the mysqladmin utility, you can delete the database.
#. / Mysqladmin drop school


▶ CREATE TABLE: table creation

Syntax: CREATE TABLE [IF NOT EXISTS] tbl_name (create_definition, ...) [table_options] [select_statement]



create_definition:
  col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
            [PRIMARY KEY] [reference_definition]
  or    PRIMARY KEY (index_col_name,...)
  or    KEY [index_name] KEY(index_col_name,...)
  or    INDEX [index_name] (index_col_name,...)
  or    UNIQUE [INDEX] [index_name] (index_col_name,...)
  or    [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...)
            [reference_definition]
  or    CHECK (expr)

type:
        TINYINT[(length)] [UNSIGNED] [ZEROFILL]
  or    SMALLINT[(length)] [UNSIGNED] [ZEROFILL]
  or    MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL]
  or    INT[(length)] [UNSIGNED] [ZEROFILL]
  or    INTEGER[(length)] [UNSIGNED] [ZEROFILL]
  or    BIGINT[(length)] [UNSIGNED] [ZEROFILL]
  or    REAL[(length,decimals)] [UNSIGNED] [ZEROFILL]
  or    DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL]
  or    FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL]
  or    DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL]
  or    NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL]
  or    CHAR(length) [BINARY]
  or    VARCHAR(length) [BINARY]
  or    DATE
  or    TIME
  or    TIMESTAMP
  or    DATETIME
  or    TINYBLOB
  or    BLOB
  or    MEDIUMBLOB
  or    LONGBLOB
  or    TINYTEXT
  or    TEXT
  or    MEDIUMTEXT
  or    LONGTEXT
  or    ENUM(value1,value2,value3,...)
  or    SET(value1,value2,value3,...)

index_col_name:
        col_name [(length)]

reference_definition:
        REFERENCES tbl_name [(index_col_name,...)]
                   [MATCH FULL | MATCH PARTIAL]
                   [ON DELETE reference_option]
                   [ON UPDATE reference_option]

reference_option:
        RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT

table_options:
    type = [ISAM | MYISAM | HEAP]
or    max_rows = #
or    min_rows = #
or    avg_row_length = #
or    comment = "string"
or    auto_increment = #

select_statement:
    [ | IGNORE | REPLACE] SELECT ...  (Some legal select statement)



CREATE TABLE that are currently in use to create new tables in the database. If the data is not selected database tables with the same name exists, or if an error occurs.

MySQL 3.22 and later versions, such as db_name.tbl_name specify the name of the table to be able to give the selected database is not required. Starting with version 3.23 also provides IF NOT EXISTS keywords to use it only if the table does not exist generates an error occurs'm in does not already exist.

Each table tbl_name of the database, the following three files in the directory exists.

File function
tbl_name.frm table structure definition file
tbl_name.ISD data file
tbl_name.ISM index file

Ten thousand days NULL or NOT NULL column is not defined as NULL columns are made automatically.
BLOB and TEXT columns, you can specify a NOT NULL, NULL is defined as always. AUTO_INCREMENT integer column you can use keywords. AUTO_INCREMENT columns defined as NULL or 0 if you enter in the appropriate column of the input than the maximum value is increased by 1. AUTO_INCREMENT column should begin with 1. Row with the maximum value of ten thousand days to be deleted, enter new rows, the value is used again. Of a table can be only one AUTO_INCREMENT column and must be used only as an index must be defined.
Ten thousand and one DEFAULT option is used, the column is not NULL, NULL if the column is NOT NULL column values ​​in one of the following values ​​are assigned automatically.
AUTO_INCREMENT columns, 0 if non-numeric
If a non-TIMESTAMP type column of the type naljjahyeong zero value (zero value)
Column is an empty string literal
UNIQUE column must have a different value for each row. Equal to the value of ten thousand and one existing row is entered, an error is due to an error,
KEY is another name for the INDEX.
A multiple-column PRIMARY KEY can be used. Later in the column definition can not just use PRIMARY KEY (index_col_name, ...) should write as another line.
The index if you do not specify a name in the first number in the index column is automatically created in the form attached,
The index can not use the keyword NULL column. So you do not declare the NOT NULL or an error occurs
BLOB and TEXT columns cannot be indexed.
Only part of a CHAR or VARCHAR column col_name (length) in the same way as the index is the index of the file size smaller.
TEXT or BLOB column using ORDER BY or GROUP BY clause at the beginning of the column max_sort_length variable is used only in the defined length. FOREIGN KEY, CHECK, REFERENCES syntax compatibility with other database exists for holding grudges and not actually have any effect.

▶ ALTER TABLE

Syntax: ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]



alter_spec:
        ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
  or    ADD INDEX [index_name] (index_col_name,...)
  or    ADD PRIMARY KEY (index_col_name,...)
  or    ADD UNIQUE [index_name] (index_col_name,...)
  or    ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}
  or    CHANGE [COLUMN] old_col_name create_definition
  or    MODIFY [COLUMN] create_definition
  or    DROP [COLUMN] col_name
  or    DROP PRIMARY KEY
  or    DROP INDEX key_name
  or    RENAME [AS] new_tbl_name
  or    table_option



The ALTER TABLE command to change the structure of the table that is created allows. For example, add or delete columns, can be changed and the index can be created or deleted

ALTER TABLE command to copy the original table into a temporary table to apply the changes and rename the new table and delete the original table will be. By doing so, change the structure of a table that occurs during the update is done without fail. Changed the table until ready to write new and renewal will be delayed for a while.


In order to use the ALTER TABLE command on a table select, insert, delete, update, create, drop must have permission.
IGNORE keyword is a MySQL extension. Using this index, based on existing data in the column can be controlled using the IGNORE that changes in the tables that exist in the index column as the index column is deleted, all rows except the first row.
Several of the ADD, ALTER, DROP, CHANGE syntax of an ALTER TABLE command can be used in
CHANGE col_name, DROP col_name, DROP INDEX is a MySQL extension.
About the ALTER TABLE MODIFY is an extension of Oracle.
COLUMN keyword can be omitted
Without any options, ALTER TABLE tbl_name RENAME AS new_name syntax you can simply change the name of the table.
Also use CHANGE old_col_name create_definition statements can change the column name. The old and new column names and column names are the types of columns is to write. For example, the INTEGER column named b a If you want to be as follows.
mysql> ALTER TABLE t1 CHANGE a b INTEGER;

Ten thousand days without changing the name of the column type to replace only two times consecutively the same name, is to write, which is the same old name and new name is meant.
mysql> ALTER TABLE t1 CHANGE b b BIGINT NOT NULL;

MODIFY MySQL 3.22.16 and later versions support syntax without specifying a new name as follows: the column was able to change people.
mysql> ALTER TABLE t1 MODIFY b BIGINT NOT NULL;


Ten thousand days using CHANGE or MODIFY the column index of the ten thousand and two took some part to reduce the length of the column when the size of the index lower than that small can not be changed.
DROP INDEX removes an index. MySQL does not support the ANSI SQL92, which is an extension
That serve as the index column is deleted, the index created on that column is also automatically supports.
DROP PRIMARY KEY will remove the primary key index. Ten thousand days if there is no primary key exists in the table earlier in the UNIQUE index deletes.
FOREIGN KEY, CHECK REFERENCES option is actually no action. These things do exist only for backward compatibility only. On the use of ALTER TABLE below are some examples.

Create a table t1.
mysql> CREATE TABLE t1 (a INTEGER, b CHAR (10));

Changes to table t1, t2 is the name of.
mysql> ALTER TABLE t1 RENAME t2;

The column a from INTEGER to TINYINT NOT NULL column type change only CHAR (10) column b, CHAR (20) and put in the name of the c.
mysql> ALTER TABLE t2 MODIFY a TINYINT NOT NULL, CHANGE bc CHAR (20);

add a new TIMESTAMP column named d.
mysql> ALTER TABLE t2 ADD d TIMESTAMP;

Create an index on column d and column a the primary key made.
mysql> ALTER TABLE t2 ADD INDEX (d), ADD PRIMARY KEY (a);

Column c is removed.
mysql> ALTER TABLE t2 DROP COLUMN c;

Add an AUTO_INCREMENT column c. NOT NULL AUTO_INCREMENT column is the index of the fact that the Notice must be created.
mysql> ALTER TABLE t2 ADD c INT UNSIGNED NOT NULL AUTO_INCREMENT, ADD INDEX (c);

▶ OPTIMIZE TABLE

Grammar: OPTIMIZE TABLE tbl_name

OPTIMZE TABLE on a table worth of data deleted or VARCHAR, BLOB, TEXT, such as if the event of significant changes in variable width columns are used. Deleted data Linked INSERT command followed by the remaining space, so storage space reuse is discontinuous. OPTIMIZE TABLE command will return the unused space.

OPTIMIZE TABLE to create a copy of the original table will work. Previously unused space on the table sum up the new table is created, the previous table is deleted and the name of a temporary table is deleted, as the table changes. In this way, the update is successful because all the OPTIMIZE TABLE command is executed even while the original table that can read and write data updates, and the newly created table will be a delay until you are ready.


▶ DROP TABLE

Syntax: DROP TABLE [IF EXISTS] tbl_name [, tbl_name, ...]

DROP TABLE to delete one or more tables. All the data and the structure of the table within a table definition for use in an instant gone, be careful. From future versions of MySQL 3.22 with the addition of IF EXISTS keyword if you do not have a table was able to prevent errors caused.

▶ DELETE

Syntax: DELETE [LOW_PRIORITY] FROM tbl_name [WHERE where_definition] [LIMIT rows]

DELETE deletes a row that satisfies the condition after a given number of rows deleted is returned.

If you omit the WHERE clause, ten thousand days, all rows are deleted. In this case, MySQL is the first to create a new empty table with the same name, this method is faster than erasing each row. The number of rows deleted will return 0.

We have some time, although it may take a few more if you want to know if the row is deleted, do not omit the WHERE clause as follows: Give a written description is always true.
mysql> DELETE FROM tbl_name WHERE 1> 0;

Of course, without a WHERE clause is omitted in this case both are much slower than clear.
Ten thousand days LOW_PRIORITY using keywords used by all users of that table, the execution of the DELETE is delayed until the end.

The data area data being erased by adding a new discrete filled because the OPTIMIZE TABLE command and isamchk utility allows you to speed is increased. Isamchk the other hand, OPTIMIZE TABLE, easy-to-use utility recover faster.

MySQL only possible using the LIMIT keyword to specify the number of rows to be deleted at once, can give. How much data it can not be predicted whether the deletion can be used to save time. If you use LIMIT as well as repeat any material that meets the conditions can be deleted.

▶ SELECT

Syntax: SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [DISTINCT | ALL]



select_expression,...
    [INTO OUTFILE 'file_name' export_options]
    [FROM table_references
        [WHERE where_definition]
        [GROUP BY col_name,...]
        [HAVING where_definition]
        [ORDER BY {unsigned_integer | col_name} [ASC | DESC] ,...]
        [LIMIT [offset,] rows]
        [PROCEDURE procedure_name] ]



SELECT more than one table is used to import data from.
select_expression column indicates the data is imported. SELECT statement, rather than the columns of the table represent the result of a simple operation or function can be used even if. Here's an example:



mysql> SELECT 1 + 1;
-> 2



All keywords have to come in the order shown in the above usage. For example, the back and ORDER BY GROUP BY HAVING clause always has to come in between.


With AS alias column name (alias) can be written as: ORDER BY, or HAVING clause aliases can be used.
mysql> select concat (last_name, ',', first_name) AS full_name from mytable ORDER BY full_name;


FROM table_references table indicates the data is imported. Ten thousand days when using two or more tables will have a join.

The column name col_name, tbl_name.col_name, db_name.tbl_name.col_name in the same way as you can see. However, two or more columns in a table that is common to use unless you can safely skip.

Data for the alignment of the ORDER BY, GROUP BY section, column names and aliases of the columns, the column index (starting from 1) may be used.



mysql> select college, region, seed from tournament
           ORDER BY region, seed;
mysql> select college, region AS r, seed AS s from tournament
           ORDER BY r, s;
mysql> select college, region, seed from tournament
           ORDER BY 2, 3;



In order to sort in descending order using the DESC keyword is To sort in ascending order by default to use the ASC keyword can be omitted because it is.


Select_expression shown in the HAVING clause column, columns, and can refer to the alias. This section just before the output data is processed in the last. Thus, within the WHERE HAVING clause must be used in the column should be writing. The following example is incorrect.
mysql> select col_name from tbl_name HAVING col_name> 0;

We will have the following.
mysql> select col_name from tbl_name WHERE col_name> 0;

MySQL 3.22.5 and later versions can be written as follows.
mysql> select user, max (salary) from users group by user HAVING max (salary)> 10;

Version, instead of nine cases and write something like this:
mysql> select user, max (salary) AS sum from users group by user HAVING sum> 10;


Data represented by the LIMIT clause in the SELECT statement allows you to adjust the number of. LIMIT one or two factors may have When used with two arguments in front of ten thousand and one factor is the number of rows to skip. Import into the argument after the maximum number of rows. If there is only one factor used is considered as the first argument is zero is to bring as many rows as the given value. In other words, LIMIT n is LIMIT 0, n. And is the same.



mysql> select * from table LIMIT 5,10; # 6-15 rows
If one argument is given, it indicates the maximum number of rows to return.
mysql> select * from table LIMIT 5; # The first five rows




SELECT ... INTO OUTFILE 'file_name' to save the imported data to a file, the file is created on the server and file of the same name must not already exist. In addition, the user must have to have file permissions.

▶ JOIN

Within a SELECT statement, MySQL supports the following JOIN statement.

Grammar: table_reference, table_reference
table_reference [CROSS] JOIN table_reference
table_reference STRAIGHT_JOIN table_reference
table_reference LEFT [OUTER] JOIN table_reference ON conditional_expr
table_reference LEFT [OUTER] JOIN table_reference USING (column_list)
table_reference NATURAL LEFT [OUTER] JOIN table_reference
{Oj table_reference LEFT OUTER JOIN table_reference ON conditional_expr}

At the end of any ODBC-compliant LEFT OUTER JOIN syntax is there for.


See the table tbl_name AS alias_name or tbl_name alias_name the same way as can be.
mysql> select t1.name, t2.salary from employee AS t1, info AS t2 where t1.name = t2.name;


ON condition for being used in a WHERE clause is not allowed.

LEFT JOIN on a table by ten thousand and one right hand that meets the conditions in the absence of data is NULL, all columns of the table ohreunpyeo imaginary line is processed. Using these characteristics of a table that exists only in the number of data are available.

mysql> select table1. * from table1 LEFT JOIN table2 ON table1.id = table2.id where table2.id is NULL; data in the above example of table1 table2 id value does not exist in the data brings all.


USING column_list section must be used both tables, column names must exist in both. Below is an example:

A LEFT JOIN B USING (C1, C2, C3, ...)

This statement can be written as follows.
A.C1 = B.C1 AND A.C2 = B.C2 AND A.C3 = B.C3, ...

That only a few examples include the following:
mysql> select * from table1, table2 where table1.id = table2.id;
mysql> select * from table1 LEFT JOIN table2 ON table1.id = table2.id;
mysql> select * from table1 LEFT JOIN table2 USING (id);
mysql> select * from table1 LEFT JOIN table2 ON table1.id = table2.id LEFT JOIN table3 ON table2.id = table3.id;

▶ INSERT

Syntax: INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name [(col_name, ...)] VALUES (expression, ...), (...), ... or INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name [(col_name, ...)] SELECT ... or INSERT [LOW_PRIORITY | DELAYED] [IGNORE] [INTO] tbl_name SET col_name = expression, col_name = expression, .
INSERT inserts new rows in the table.
The INSERT ... SELECT from another table, a SELECT statement is used to enter data. The row is inserted, the table tbl_name people. Column name or the SET clause is used to specify the column data is inserted.


Ten thousand and one INSERT ... VALUES or INSERT ... If the columns in the SELECT statement is specified, all columns of data each corresponding VALUES (), or by the SELECT statement must be provided. Ten thousand days of the order of columns in the table if you do not know if you use DESCRIBE tbl_name can be recognized easily.

expression values ​​shown in part before the VALUES list are available. Consider the following example.
mysql> INSERT INTO tbl_name (col1, col2) VALUES (15, col1 * 2);

However, if an error occurs. You can refer to values ​​from the front, please note that.
mysql> INSERT INTO tbl_name (col1, col2) VALUES (col2 * 2,15);

Ten thousand days LOW_PRIORITY using keywords being used by all other users to read from the table to finish the job will be delayed until the execution of an INSERT statement.

IGNORE keyword, such as the data that you insert a new key (PRIMARY or UNIQUE key) with a value of data is ignored, then the data is entered. Ten thousand days if you do not use INSERT IGNORE stops running and turns. The mysql_info () function used in the table can see how many rows are inserted.

If NOT NULL is entered in the column, NULL is ignored and the default value is entered.

Numeric values ​​are entered in the column, if used beyond the scope has been changed to the nearest number that can be displayed are inserted.

CHAR, VARCHAR, TEXT, BLOB column position is greater than the maximum input that can be displayed if data is received, whichever is truncated input.

Enter the date in the column is not appropriate when the value of zero value (zero value) is entered into.
DELAYED option to run the INSERT statement can not wait to be very useful for users if there is. In this case, ten thousand days to use the SELECT statement if you give the priority to run first and then execute the INSERT statement is processed. This is not a MySQL extension to ANSI SQL92 is
Another advantage of the DELAYED option by many users when an INSERT happens once they collect the data to be inserted by the write operation is that In this case, when you insert each of the data is faster than the job.

▶ REPLACE

Syntax: REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name [(col_name, ...)] VALUES (expression, ...) or REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name [(col_name, ...)] SELECT . or REPLACE [LOW_PRIORITY | DELAYED] [INTO] tbl_name SET col_name = expression, col_name = expression, ... REPLACE command with the INSERT command behaves similarly to a conventional one difference - the same as the value of the index column of the row to delete the existing row is entered, enter a new line made.

▶ LOAD DATA INFILE

Syntax: LOAD DATA [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\ t'] [OPTIONALLY] ENCLOSED BY "] [ESCAPED BY '\ \']] [LINES TERMINATED BY '\ n'] [IGNORE number LINES] [(col_name, ...)] LOAD DATA INFILE command to read data from a text file, enter the table gives a very fast pace. LOCAL keyword is used on the client's host existing file should be used. If not, MySQL, the running files that exist on the server is used. files that exist on the server using the LOAD DATA INFILE command to execute the file must have permissions and security reasons that exist on the server When reading a file that exists in the directory data base that can be read by anyone, or should have permission.

Files that exist on the server using the following rules have to.

If the name is given as an absolute path as the path follows the
If you are using a relative path is given ten thousand days of the database is recognized as a relative path to the directory.
Image name without the path of the database you are using to find the files in the directory

REPLACE and IGNORE keywords entered into the index column, a row of data is controlled. Ten thousand days to use REPLACE the existing row is deleted and a new value is entered, IGNORE intimate all use the new value is ignored and the existing value is preserved. If there are ten thousand days ohruga keyword occurs.

If you use the keyword FIELDS TERMINATED BY, [OPTIONALLY] ENCLOSED BY, ESCAPED BY option should be used more than one of the ten thousand and one must not use the FIELDS keyword is the default if you like, and then gave the order.
FIELDS TERMINATED BY '\ t' ENCLOSED BY "ESCAPED BY '\ \'

If you do not use the LINES keyword, and then gave the orders is the same as the default value.
LINES TERMINATED BY '\ n'

In other words, the default value of LOAD DATA INFILE command, as follows:

The return value of each line (newline) is divided into.
Each column is separated by tabs.
Each data does not use quotation marks.
Line as the `\ 'character is used ▶ UPDATE

Syntax: UPDATE [LOW_PRIORITY] tbl_name SET col_name1 = expr1, col_name2 = expr2, ... WHERE where_definition] UPDATE command for each column in the table shall be updated with a new value. SET statement is used to specify a new value column and change. Ten thousand days, when given the WHERE clause is updated only those rows that satisfy the condition is omitted, all rows are updated.

LOW_PRIORITY option is used, all other clients on that table read operation is delayed until the end of the execution of UPDATE.

SET When you use column names in the syntax of the table is stored in the corresponding column values ​​are used in the column under the age of increasing the current value as a example.
mysql> UPDATE persondata SET age = age +1;

UPDATE statement, each operation is run from left to right. Column under the age of the current value increases by 1 to 2 times, then examples.

mysql> UPDATE persondata SET age = age * 2, age = age +1;

Wait: If the current value, MySQL ignores it and the same value if the update does not run.

▶ USE

Grammar: USE db_name

USE command to change the database to use.

mysql> USE db1;
mysql> SELECT count (*) FROM mytable; # selects from db1.mytable
mysql> USE db2;
mysql> SELECT count (*) FROM mytable; # selects from db2.mytable

USE command to the database with a specific database by name give an existing table in another database can be used.

The following example database db1 and db2 that exist in the author table in a database table editor shows how to use.
mysql> USE db1;
mysql> SELECT author_name, editor_name FROM author, db2.editor WHERE author.editor_id = db2.editor.editor_id; USE command is provided for compatibility with Sybase.

▶ FLUSH

Grammar: FLUSH flush_option [, flush_option]

Used by MySQL Clears the internal cache is used to read the commands. To use this command must have the reload privilege.

flush_option have the following options.




HOSTS
The host table is read again. You want to connect to the host's IP has changed or if you add a new host, and "Host ... is blocked" error message or the host table when you must re-reads. More than up to the host access error if they attempt to connect (max_connect_errors), and this occurs when something goes wrong, MySQL, and that the judgment is registered in the host table the host even more will be denied access. To prevent these errors, such as the following by a very large number are ttuiwoomyeon daemon.
shell> mysqld-O max_connection_errors = 999999999

Creates a new empty log file is LOGS. Ten thousand days to specify the name of the log file without an extension give that old log files automatically in the name of the file name is incremented by 1 is formed.

PRIVILEGES mysql rights management table in the database is read again.

TABLES Closes all open tables.

STATUS all the state variables (status variables) to zero makes



You can also use the mysqladmin utility as follows: the same thing could be done.
shell> mysqladmin flush-hosts, flush-logs, reload, flush-tables

▶ KILL

Syntax: KILL thread_id

Each connection to mysqld by will operate as an independent thread. By SHOW PROCESSLIST command threads can be seen running by the KILL thread_id command can kill a thread. If you have the PROCESS privilege can see all the threads, otherwise you can only see their own threads.

Check the thread below and in the same way as you are able to kill.
shell> mysqladmin processlist and shell> mysqladmin kill thread_id

▶ SHOW

Tables, columns, and other information on the system.

Syntax: SHOW DATABASES [LIKE wild] or SHOW TABLES [FROM db_name] [LIKE wild] or SHOW COLUMNS FROM tbl_name [FROM db_name] [LIKE wild] or SHOW INDEX FROM tbl_name [FROM db_name] or SHOW STATUS or SHOW VARIABLES [LIKE wild ] or SHOW PROCESSLIST or SHOW TABLE STATUS [FROM db_name] [LIKE wild]

SHOW command, the database, table, column, MySQL server, information about shows. If you use a LIKE statement `% 'and` _' wildcard characters can be used

db_name.tbl_name in the same format as the tbl_name FROM db_name can be used. Therefore, the following two sentences are the same function.
mysql> SHOW INDEX FROM mytable FROM mydb;
mysql> SHOW INDEX FROM mydb.mytable;

SHOW DATABASES - MySQL database that exists on the server host, showing a list. Mysqlshow command shell prompt, the same function is over.

SHOW TABLES - that exist within the selected database table shows Mysqlshow db_name shell prompt are over.

Note: If you do not have permission to nothing on the table, the results do not appear.

SHOW COLUMNS displays information about the columns in the table. Also plays a role similar to the DESCRIBE command.

SHOW TABLE STATUS - 3.23 version has been added. SHOW STATUS and similar features, but detailed information on each table can be obtained. Shell prompt mysqlshow - status db_name command can achieve the same result through.

The following information is shown.


Name the table name
Type Table Type (NISAM, MYISAM, HEAP)
Rows of columns
The average length of the column Avg_row_length
Data_length the size of a data file
The maximum size of data files Max_data_length
The size of the index file Index_length
Data_free in the data file size of allocated but unused space
Auto_increment Auto_increment the following values ​​of the column
Create_time table creation time of
Update_time table's last modified time
Hours last checked Check_time table
When the table was created Create_min_rows "min_rows" option whether to use
When the table was created Create_max_rows "max_rows" option whether to use
When the table was created Create_avg_row_length "avg_row_length" option whether to use
When the table was created, you entered a comment Comment


SHOW FIELDS - SHOW COLUMNS and SHOW KEYS is or columns of the table shows, or index information.

SHOW INDEX - The following index shows the information


Table table name
Non_unique index equal to zero if not stored
The name of the index Key_name
Seq_in_index first column in the index is a few, starting with 1.
The column name Column_name
Collation index is stored, but how. A (Sort), NULL (Not sorted).
Cardinality The number of index only data that exist within
If only part of the column to the index Sub_part size. NULL is used, the entire ten thousand and one columns


SHOW STATUS - displays information about the status of the server. Sweb mysqladmin extended-status command at the prompt as. The resulting value will be similar to that shown below.


+ -------------------------- + -------- +
| Variable_name | Value |
+ -------------------------- + -------- +
| Aborted_clients | 0 |
| Aborted_connects | 0 |
| Created_tmp_tables | 0 |
| Delayed_insert_threads | 0 |
| Delayed_writes | 0 |
| Delayed_errors | 0 |
| Flush_commands | 2 |
| Handler_delete | 2 |
| Handler_read_first | 0 |
| Handler_read_key | 1 |
| Handler_read_next | 0 |
| Handler_read_rnd | 35 |
| Handler_update | 0 |
| Handler_write | 2 |
| Key_blocks_used | 0 |
| Key_read_requests | 0 |
| Key_reads | 0 |
| Key_write_requests | 0 |
| Key_writes | 0 |
| Max_used_connections | 1 |
| Not_flushed_key_blocks | 0 |
| Not_flushed_delayed_rows | 0 |
| Open_tables | 1 |
| Open_files | 2 |
| Open_streams | 0 |
| Opened_tables | 11 |
| Questions | 14 |
| Running_threads | 1 |
| Slow_queries | 0 |
| Uptime | 149111 |
+ -------------------------- + -------- +


Each entry shows the following information.


Aborted_clients client does not exit the normal number of connections is broken
Aborted_connects MySQL tries to connect but failed seobeone number of connections
Created_tmp_tables SQL statement is executed, the number of tables generated during the interim
INSER Delayed_insert_threads delay your door (delayed insert handler) Wed
By Delayed_writes INSERT DELAYED rows written.
Failure by Delayed_errors INSERT DELAYED rows
Flush_commands FLUSH command, the number of executions
Wed teyibeulnaehaeng Handler_delete delete command
First, the number of read commands Handler_read_first table
Handler_read_key index-based table read instruction count
Sort Handler_read_next according to the index number of commands executed to read the next row
Read command is executed on a table row Handler_read_rnd Wed monospace
Handler_update be running the table the UPDATE command
Handler_write be running the table INSERT command
Key_blocks_used index cache blocks used by
Key_read_requests number of commands processed by the index cache
Key_reads physical disk reads
Key_write_requests number of commands stored in the cache index blocks
Key_writes number of commands stored in physical disk blocks
The maximum number of connections that can be processed simultaneously Max_used_connections
Not_flushed_key_blocks index information in the cache has changed, but not yet saved to disk blocks
Not_flushed_delayed_rows INSERT DELAY The number of rows processed by the pending
Open_tables number of tables currently open for use
Open_files number of files opened
Log number of connections connected to Open_streams
Until now, the number of tables open Opened_tables
Questions Questions requested by the server
Connections are connected to Running_threads Thread Wed
Slow_queries long_query_time defined in the run-time than the time exceeded the number of requests
Uptime server start elapsed time after


SHOW VARIABLES

MySQL is the output of the system variables. Mysqladmin variables command from the system prompt, the same information can be seen through. To change the default values ​​of some variables to mysqld is run by giving the command-line options.

The results will be similar to the following.


+ ------------------------ + ------------------------ - +
| Variable_name | Value |
+ ------------------------ + ------------------------ - +
| Back_log | 5 |
| Connect_timeout | 5 |
| Basedir | / my / monty / |
| Datadir | / my / monty / data / |
| Delayed_insert_limit | 100 |
| Delayed_insert_timeout | 300 |
| Delayed_queue_size | 1000 |
| Join_buffer_size | 131072 |
| Flush_time | 0 |
| Key_buffer_size | 1048540 |
| Language | / my / monty / share / english / |
| Log | OFF |
| Log_update | OFF |
| Long_query_time | 10 |
| Low_priority_updates | OFF |
| Max_allowed_packet | 1048576 |
| Max_connections | 100 |
| Max_connect_errors | 10 |
| Max_delayed_threads | 20 |
| Max_heap_table_size | 16777216 |
| Max_join_size | 4294967295 |
| Max_sort_length | 1024 |
| Max_tmp_tables | 32 |
| Net_buffer_length | 16384 |
| Port | 3306 |
| Protocol-version | 10 |
| Record_buffer | 131072 |
| Skip_locking | ON |
| Socket | / tmp / mysql.sock |
| Sort_buffer | 2097116 |
| Table_cache | 64 |
| Thread_stack | 131072 |
| Tmp_table_size | 1048576 |
| Tmpdir | / machine / tmp / |
| Version | 3.23.0-alpha-debug |
| Wait_timeout | 28800 |
+ ------------------------ + ------------------------ - +


MySQL administration and tuning in the next chapter with a description of each parameter tuning method discussed.

SHOW PROCESSLIST
Show threads currently connected.
shell> mysqladmin processlist command can also use the same information can be obtained. By default, the information can only see their own thread and if you have the PROCESS privilege gives you information about all threads. In this case, use the KILL command to kill the thread can be

▶ LOCK TABLES / UNLOCK TABLES

Grammar: LOCK TABLES tbl_name [AS alias] READ | [LOW_PRIORITY] WRITE [, tbl_name READ | [LOW_PRIORITY] WRITE ...] ... UNLOCK TABLES LOCK TABLES command on the table for the current thread lock (lock) and hangs. Sseuredeuran connect to the database can be thought of as the access unit. UNLOCK TABLES all locks taken by the current thread contents. Locked by a thread of all the tables into another table lock this thread that locks automatically when disconnected, or is revealed.

If one thread, a table read (READ) locks the user only dials the thread can read the table.

Also, write a thread (WRITE), if a lock that only the user table of the thread will be able to read and write. The table lock is taken on other threads will wait until it disengages.

In general, the priority is rakboda nopeunde read write lock when it updates as soon as possible to ensure that progress is In other words, to read a thread lock thing on the table while another thread writes to a table lock, the lock dials thing before reading the thread will wait until the write to be unlocked.

In general, only one table to update me if you do not need to lock. Because of a thread if you are running SQL statements from the other thread because the thread can interfere with. Sometimes it may be necessary locks exposed.

Number of consecutive series of ten thousand and one on the table if you need to work more if you want to use the lock on the table can be faster. MySQL is a transaction (transaction) does not provide functionality between ten thousand and one SELECT and UPDATE not cut to prevent other threads must use LOCK TABLES command.

This series of cases to handle the job safely is below.

mysql> LOCK TABLES trans READ, customer WRITE;
mysql> select sum (value) from trans where customer_id = some_id;
mysql> update customer set total_value = sum_from_previous_statement
where customer_id = some_id;
mysql> UNLOCK TABLES;
In this case, ten thousand days if you do not use LOCK TABLES command, SELECT and UPDATE command is inserted between the threads of other users can.

▶ GRANT / REVOKE

Grammar:
GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...]
    ON tbl_name | * | *. * | Db_name. *
    TO user_name [IDENTIFIED BY 'password']
        [, User_name [IDENTIFIED BY 'password'] ...]
    [WITH GRANT OPTION]

REVOKE priv_type [(column_list)] [, priv_type [(column_list)] ...]
    ON tbl_name | * | *. * | Db_name. *
    FROM user_name [, user_name ...]
GRANT and REVOKE commands to the system administrator database user of the following four steps will help grant or revoke permissions.

commands allow system administrators to grant and revoke rights to MySQL users at four privilege levels:
Global Level
This privilege for all databases on the server with the privileges of the mysql database is stored in the user table.

Database Level
That exist in a specific database privilege for all tables in the mysql database db, host are stored in tables.

Table level
For all columns in a table in the mysql database tables_priv privileges are stored in tables.

Column level
Specific for a single column in a table with the privileges of the mysql database table is stored in columns _priv.

Their privileges a user to grant other users (GRANT) to wrest authority is as follows.

REVOKE GRANT OPTION ON priv FROM user;

Permission is available for tables SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, GRANT, INDEX, ALTER. Include:

▶ CREATE INDEX

The index is created.
Syntax: CREATE [UNIQUE] INDEX index_name ON tbl_name (col_name [(length]), ...)

CREATE INDEX syntax for MySQL 3.22. In previous versions do not, no action. Since version 3.22 the CREATE INDEX ALTER TABLE syntax to create an index, such as plays a role.

In general, all the indexes using the CREATE TABLE statement to create a table at the time of creation, but the CREATE INDEX syntax that already exists, you can add an index on a table. A list of columns in parentheses (col1, col2, ...) and listed as a multi-column index can be made by. The index value is generated by a combination of the two columns is created.

The index generated by a subset of the columns in CHAR and VARCHAR columns col_name (length) specifying length as giving only a portion of the column can be used.

The beginning of the name column in the example below to make the index shows that only 10 digits.
mysql> CREATE INDEX part_of_name ON customer (name (10));
In this case, the full name search will be slower than creating index, but can save a lot of disk space and speeds up when INSERT is performed.

▶ DROP INDEX

Syntax: DROP INDEX index_name

The index is deleted. DROP INDEX syntax for MySQL 3.22. In previous versions do not, no action. 3.22 In a future version to delete the index DROP INDEX and ALTER TABLE syntax is the same role.















The difference between SQL SERVER and ORACLE object




Classification
Microsoft SQL Server
Oracle
Number of columns
1024
254
The size of the row
8060 bytes, and each text or image column to indicate the 16-byte
Unlimited (one for each row of the long or long raw allowed)
The maximum number of rows
Unlimited
Unlimited
Blob type of storage
16-byte pointer stored in each row. Data stored in different data pages
For each table a long or long raw, must be the end of the line, the data stored in the same block row
Clustered indexes on tables
One for each table
One for each table (a table with index)
Non-clustered indexes on tables
249 for each table
Unlimited
The maximum number of columns in an index of
16
16
The maximum length of column values ​​in the index
900-byte
½ block
Table Naming Conventions
[[[Server.] Database.] Owner.] Table_name
[Schema.] Table_name

SQL SERVER and ORACLE how to deal with an object identifier
Oracle
Microsoft SQL Server
1-30 characters in length.
Database Name: up to 8 characters
Database link names: up to 128 characters

1 to 128 Unicode characters long
Temporary table names: up to 116 characters

Identifier names begin with an alphabetic character and alphanumeric characters, or _, $, #, must contain characters.

Identifier names must start with an alphanumeric character or _ and in fact you can use any character.

Identifier begins with a space or _, @, #, or $ if they contain characters other than those, around the identifier name [] (separator) must be used.

Object if you start with @,
This is a local variable.
# Local temporary object.
# # Is a global temporary object.

The table space name must be unique.

The database name must be unique.

User accounts (schemas) in the name of the identifier must be unique.

Identifier in the database user account name must be unique.

See the table and column names must be unique from.

See the table and column names must be unique from.

The name of the index in a user schema must be unique.

The name of the index in the database table name must be unique.


Table and index storage parameters
Oracle
Microsoft SQL Server
CREATE TABLE DEPT_ADMIN.DEPT (
DEPT VARCHAR2 (4) NOT NULL,
DNAME VARCHAR2 (30) NOT NULL,
CONSTRAINT DEPT_DEPT_PK
                           PRIMARY KEY (DEPT)
USING INDEX TABLESPACE USER_DATA
PCTFREE 0 STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED),
CONSTRAINT DEPT_DNAME_UNIQUE
                           UNIQUE (DNAME)
USING INDEX TABLESPACE USER_DATA
PCTFREE 0 STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED)
)
PCTFREE 10 PCTUSED 40
TABLESPACE USER_DATA
STORAGE (INITIAL 10K NEXT 10K
MINEXTENTS 1 MAXEXTENTS UNLIMITED
FREELISTS 1)
CREATE TABLE USER_DB.DEPT_ADMIN.DEPT (
DEPT VARCHAR (4) NOT NULL,
DNAME VARCHAR (30) NOT NULL,
CONSTRAINT DEPT_DEPT_PK
             PRIMARY KEY CLUSTERED (DEPT),
CONSTRAINT DEPT_DNAME_UNIQUE
             UNIQUE NONCLUSTERED (DNAME)
)

1's complement and two's complement why you need





Subtract from the computer calculation is very difficult circuit.
Only plus routine swipgoyo.
So, to use as a shortcut for addition subtraction is to use a conservative.

To give an example with a 4-bit, for example, would be happy to explain.
For the first description of repair of thumb
1's complement of 0 to 1 is the conversion of 1 to 0.
Thus, the 1's complement of the number 7
7, 0111 in binary (4 bits is if any).
This is the 1's complement of 1000.
Two's complement of the one plus one is to repair.
Doejiyo 1000 + 1 = 1001.

1's complement and two's complement 1001 1000 -11 are intended to represent both.

I'll try to decimal subtraction.
Is 4-2 = 2. If you switch to this format, plus
4 + (-2) = 2. So in order to display the binary representation of 4 and -2 when plotted

4 = 0100
-2
=> 0010 (decimal +2)
=> 1101 (1's complement.)
=> 1110 (2's complement: 1's complement +1)

4 + (-2)
=> 0100 + 1110
=> 10010
=> 0010 (4 bits onto one bit since abandoned).
=> 2 (converted to decimal)

In this way, a subtraction operation to addition operation will be able to handle.


So why use a lot of two's complement ideas?
It displays the number of numbers that is.
0, 1's complement and two's complement representation of
0000 (4 bit 0)
1111 (1's complement 0)
10000 (two's complement: 1's complement + 1)
0000 (two's complement: 4 bits for handling a bit before discarding)

In the example above
0 to represent the 1's complement of the 0000, 1111 are both 0. Ten thousand in two's complement 0000 0 agent.
This can be displayed as a byte (8 bits) per number of size
If one of the bosuin: -127 - 127 => 255 total
Bosuin 2: -128 to 127 => 256 total
Take the two's complement number, so no one can be displayed due will be.

Of course, the two's complement yijiyo more efficient.