Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

MySqlÊý¾Ý¿âµÄÁÐÀàÐÍ£¨×Ö¶ÎÀàÐÍ)

MySqlÊý¾Ý¿âµÄÁÐÀàÐÍ£¨×Ö¶ÎÀàÐÍ)
MySQLÊý¾Ý¿âµÄ±íÊÇÒ»¸ö¶þά±í£¬ÓÉÒ»¸ö»ò¶à¸öÊý¾ÝÁй¹³É¡£
ÿ¸öÊý¾ÝÁж¼ÓÐËüµÄÌض¨ÀàÐÍ£¬¸ÃÀàÐ;ö¶¨ÁËMySQLÈçºÎ¿´´ý¸ÃÁÐÊý¾Ý£¬ÎÒÃÇ¿ÉÒÔ°ÑÕûÐÍÊýÖµ´æ·Åµ½×Ö·ûÀàÐ͵ÄÁÐÖУ¬MySQLÔò»á°ÑËü¿´³É×Ö·û´®À´´¦Àí¡£
MySQLÖеÄÁÐÀàÐÍÓÐÈýÖÖ£ºÊýÖµÀà¡¢×Ö·û´®ÀàºÍÈÕÆÚ/ʱ¼äÀà¡£
´Ó´óÀàÀ´¿´ÁÐÀàÐͺÍÊýÖµÀàÐÍÒ»Ñù£¬¶¼ÊÇÖ»ÓÐÈýÖÖ¡£µ«Ã¿ÖÖÁÐÀàÐͶ¼»¹¿Éϸ·Ö¡£
ÏÂÃæ¶Ô¸÷ÖÖÁÐÀàÐͽøÐÐÏêϸ½éÉÜ¡£
ÊýÖµÀàµÄÊý¾ÝÁÐÀàÐÍ
ÊýÖµÐ͵ÄÁÐÀàÐÍ°üÀ¨ÕûÐͺ͸¡µãÐÍÁ½´óÀà¡£
TINYINT£º1×Ö½Ú ·Ç³£Ð¡µÄÕýÕûÊý£¬´ø·ûºÅ£º-128~127£¬²»´ø·ûºÅ£º0~255
SMALLINT£º2×Ö½Ú Ð¡ÕûÊý£¬´ø·ûºÅ£º-32768~32767£¬²»´ø·ûºÅ£º0~65535
MEDIUMINT£º3×Ö½Ú ÖеȴóСµÄÕûÊý£¬´ø·ûºÅ£º-8388608~8388607£¬²»´ø·ûºÅ£º0~16777215
INT£º4×Ö½Ú ±ê×¼ÕûÊý£¬´ø·ûºÅ£º-2147483648~2147483647£¬²»´ø·ûºÅ£º0~4294967295
BIGINT£º8×Ö½Ú ´óÕûÊý£¬´ø·ûºÅ£º-9223372036854775808~9233372036854775807£¬²»´ø·ûºÅ£º0~18446744073709551615
FLOAT£º4×Ö½Ú µ¥¾«¶È¸¡µãÊý£¬×îС·ÇÁãÖµ£º+-1.175494351E-38£¬×î´ó·ÇÁãÖµ£º+-3.402823466E+38
DOUBLE£º8×Ö½Ú Ë«¾«¶È¸¡µãÊý£¬×îС·ÇÁãÖµ£º+-2.2250738585072014E-308£¬×î´ó·ÇÁãÖµ£º+-1.7976931348623157E+308
DECIMAL£ºM+2×Ö½Ú ÒÔ×Ö·û´®ÐÎʽ±íʾµÄ¸¡µãÊý£¬ËüµÄÈ¡Öµ·¶Î§¿É±ä£¬ÓÉMºÍDµÄÖµ¾ö¶¨¡£
ÕûÐÍÊý¾ÝÁÐÀàÐÍ
MySQLÓÐÎåÖÖÕûÐÍÊý¾ÝÁÐÀàÐÍ£¬¼´TINYINT£¬SMALLINT£¬MEDIUMINT£¬INTºÍBIGINT¡£ËüÃÇÖ®¼äµÄÇø±ðÊÇÈ¡Öµ·¶Î§²»Í¬£¬´æ´¢¿Õ¼äÒ²¸÷²»Ïàͬ¡£
ÔÚÕûÐÍÊý¾ÝÁкó¼ÓÉÏUNSIGNEDÊôÐÔ¿ÉÒÔ½ûÖ¹¸ºÊý£¬È¡Öµ´Ó0¿ªÊ¼¡£
ÉùÃ÷ÕûÐÍÊý¾ÝÁÐʱ£¬ÎÒÃÇ¿ÉÒÔΪËüÖ¸¶¨¸öÏÔʾ¿í¶ÈM(1~255)£¬ÈçINT(5)£¬Ö¸¶¨ÏÔʾ¿í¶ÈΪ5¸ö×Ö·û,Èç¹ûûÓиøËüÖ¸¶¨ÏÔʾ¿í¶È£¬MySQL»áΪËüÖ¸¶¨Ò»¸öĬÈÏÖµ¡£ÏÔʾ¿í¶ÈÖ»ÓÃÓÚÏÔʾ£¬²¢²»ÄÜÏÞÖÆÈ¡Öµ·¶Î§ºÍÕ¼Óÿռ䣬È磺INT(3)»áÕ¼ÓÃ4¸ö×ֽڵĴ洢¿Õ¼ä£¬²¢ÇÒÔÊÐíµÄ×î´óÖµÒ²²»»áÊÇ999,¶øÊÇ INTÕûÐÍËùÔÊÐíµÄ×î´óÖµ¡£
¸¡µãÐÍÊý¾ÝÁÐÀàÐÍ
MySQLÓÐÈýÖÖ¸¡µãÐÍÊý¾ÝÁÐÀàÐÍ£¬·Ö±ðÊÇ£ºFLOAT£¬DOUBLEºÍDECIMAL¡£
¸¡µãÀàÊý¾ÝÀàÐÍÓÐÒ»¸ö×î´ó¿É±íʾֵºÍÒ»¸ö×îС·ÇÁã¿É±íʾֵ£¬×îС·ÇÁã¿É±íʾֵ¾ö¶¨Á˸ÃÀàÐ͵ľ«È·¶È¡£
MySQL 4.0.2°æÖ®ºó£¬FLOATºÍDOUBLE¶¼¿ÉÒÔÖ¸¶¨UNSIGNEDÊôÐÔ¡£µ±Ö¸¶¨¸ÃÊôÐÔʱ£¬È¡Öµ·¶Î§²»Æ½ÒƵ½ÕýÊýÇø¼ä£¬¶øÖ»ÊǼòµ¥µØ°Ñ¸¡µãÀàÐ͵ĸºÊý²¿·ÝÈ¥µô¡£
¸¡µãÀàÐÍÒ²ÓÐM(1~255)ºÍD(1~30£¬ÇÒ²»ÄÜ´óÓÚM-2)¡£·Ö±ð±íʾÏÔʾ¿í¶ÈºÍСÊýλÊý¡£MºÍDÔÚFLOAT


Ïà¹ØÎĵµ£º

mysql connect c++

ÏÈÇ°ÔÚ²âÊÔmysql connect c++½Ó¿ÚµÄʱºòÔËÐÐÆä¹Ù·½ÌṩµÄÀý×Ó
21.5.5.6. MySQL Connector/C++ Complete Example 2
The following code shows a complete example of how to use MySQL Connector/C++:
/* Copyright 2008 Sun Microsystems, Inc.
This program is free software; you can redistribute it and/or modify ......

MYSQL¸´ÖÆ

ÅäÖø´ÖÆ
1.ÅäÖÃserver-idºÍlog-bin
2.Ö÷¿âÖÐÌí¼ÓÓÃÓÚ¸´ÖƵÄÓû§
 GRANT REPLICATION SLAVE,reload,super ON *.*
 TO 'repl'@'%.vm.dba.com' IDENTIFIED BY 'slavepass'
3.ÔÚ´Ó¿âÉÏÉèÖÃÓÃÓÚ¸´ÖƵÄÑ¡Ïî
server-id
master-host
master-user
master-password
--read-only ¸ÃÑ¡ÏîÈôӷþÎñÆ÷Ö»ÔÊÐíÀ´× ......

MySqlÃüÁî´óÈ«

³£¼ûµÄMySQLÃüÁî´óÈ«
Ò»¡¢Á¬½ÓMySQL
        ¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
        1¡¢Àý1£ºÁ¬½Óµ½±¾»úÉϵÄMYSQL¡£
        Ê×ÏÈÔÚ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼ mysqlbin£¬ÔÙ¼üÈëÃüÁîmysql ......

PHPºÍMySQL Web¿ª·¢ (Ô­ÊéµÚ4°æ) »úе¹¤Òµ

http://www.xhsd.com.cn/books/views.asp?plucode=711126281
Õâ±¾Êé±»³ÆΪPHPºÍMySQLµÄ“Ê¥¾­”£¬×Ðϸ¿´ÁËһϣ¬µÄÈ·Óкܶà¶Àµ½µÄµØ·½¡£
Ê×ÏÈ£¬ÄÚÈÝÃ÷È·Í»³ö¡£Õâ±¾ÊéµÄÄ¿µÄÊǶÔPHPºÍMySQL×öÉîÈëdz³öµÄ·ÖÎö£¬¶ÔÆäWebÓ¦ÓÃ×öÁ˽ÏÈ«ÃæµÄ²ûÊö£¬Àý×Ó¾­µäʵÓá£
Æä´Î£¬Ð¡£PHP5.3£¬MySQLµÄ´æ´¢¹ý³ÌºÍ´æ´¢ÒýÇ棬Ajax¼¼ ......

MySQL·À×¢Èë


·ÀÖ¹×¢ÈëµÄ¼¸ÖÖ°ì·¨
 
ÆäʵԭÀ´¾ÍÊÇÎÒÃÇÐèÒª¹ýÂËһЩÎÒÃdz£¼ûµÄ¹Ø¼ü×ֺͷûºÏÈ磺
Select£¬insert£¬update£¬delete£¬and£¬*£¬µÈµÈ
function inject_check($sql_str) {
   return eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file
|outfile', $sql_str); & ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ