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

MySQLϵͳ±äÁ¿interactive_timeout Óë wait_timeout

http://blog.chinaunix.net/u/14014/showart_490462.html
mysql>show variables like '%timeout';
´òÓ¡½á¹ûÈçÏ£º
+----------------------------+-------+
| Variable_name | Value |
+----------------------------+-------+
| connect_timeout | 5 |
| delayed_insert_timeout | 300 |
| interactive_timeout | 28800 |
| net_read_timeout | 30 |
| net_write_timeout | 60 |
| slave_net_timeout | 3600 |
| wait_timeout | 28800 |
+----------------------------+-------+
interactive_timeout ÐèÔÚmysql_connect()ÉèÖÃCLIENT_INTERACTIVEÑ¡ÏîºóÆð×÷Ó㬲¢±»¸³ÖµÎªwait_timeout£»
mysql>set wait_timeout = 10; ¶Ôµ±Ç°½»»¥Á´½ÓÓÐЧ£»
mysql>set interactive_timeout = 10; ¶ÔºóÐøÆðµÄ½»»¥Á´½ÓÓÐЧ£»
¸Ã³¬Ê±Ê±¼äµ¥Î»ÊÇÃ룬´Ó±äÁ¿´ÓÉÏ´ÎSQLÖ´ÐкóËãÆ𣻵±Ç°¿ÕÏÐÈô³¬¹ý¸Ãʱ¼ä£¬ÔòÒ²»á±»Ç¿ÖƶϿª¡£
http://blog.sina.com.cn/s/blog_473d5bba0100051j.html
mysqlÀï¹ØÓÚtimeoutµÄ¼¸¸ö±äÁ¿±³Íü(2006-07-23 21:16:52)
 
·ÖÀࣺרҵÏà¹Ø
Ïë°ÑmysqlµÄÁ¬½Ó¶Ï¿ªÊ±¼ä¸Ä³¤Ò»Ð©£¬ÒÔÇ°Ö»¸ÄÁËconnect_timeout±äÁ¿µÄÖµ£¬»¹²»¹»¡£ÏÖÔÚÓÖ¸ÄÁËÕâÁ½¸ö£¬²»Öª¹»²»¹»¡£²»¹»ÔÙ¼ÌÐø²é°É¡£         
 
interactive_timeout     
·þÎñÆ÷ÔڹرÕÁ¬½ÓÇ°ÔÚÒ»¸ö½»»¥Á¬½ÓÉϵȴýÐж¯µÄÃëÊý¡£Ò»¸ö½»»¥µÄ¿Í»§±»¶¨ÒåΪ¶Ô mysql_real_connect()ʹÓàCLIENT_INTERACTIVE Ñ¡ÏîµÄ¿Í»§£¬Ä¬ÈÏÊýÖµÊÇ28800¡£
 
wait_timeout            
·þÎñÆ÷ÔڹرÕÁ¬½Ó֮ǰÔÚÒ»¸öÁ¬½ÓÉϵȴýÐж¯µÄÃëÊý£¬Ä¬ÈÏÊýÖµÊÇ28800£¬¼´Èç¹ûûÓÐÊÂÇé·¢Éú£¬·þÎñÆ÷ÔÚ 8¸öСʱºó¹Ø±ÕÁ¬½Ó¡£
 
ÔÚÄãµÄMySQLÖÐÅäÖúÃwait-timeout²ÎÊý
  2007-09-19 01:11:28
http://www.potu.com/193938/9276848
ÔÚMySQLµÄͨÓÃÅäÖÃÎļþÖУ¬Ò»°ãûÓÐwait-timeoutÕâ¸öÅäÖÃÏ¿ÉÄܵÃÊÖ¹¤Ìí¼Ó£º
ÎÒ¶Ôwait-timeoutÕâ¸ö²ÎÊýµÄÀí½â£ºMySQL¿Í»§¶ËµÄÊý¾Ý¿âÁ¬½ÓÏÐÖÃ×î´óʱ¼äÖµ¡£
˵µÃ±È½ÏͨË×Ò»µã£¬¾ÍÊǵ±ÄãµÄMySQLÁ¬½ÓÏÐÖó¬¹ýÒ»¶¨Ê±¼äºó½«»á±»Ç¿Ðйرա£MySQLĬÈϵÄwait-timeoutֵΪ8¸öСʱ
ÉèÖÃÕâ¸öÖµÊǷdz£ÓÐÒâÒåµÄ£¬±ÈÈçÄãµÄÍøÕ¾ÓдóÁ¿µÄMySQLÁ´½ÓÇëÇó£¨Ã¿¸öMySQLÁ¬½Ó¶¼ÊÇÒªÄÚ´æ×ÊÔ´¿ªÏúµÄ£©£¬ÓÉÓ


Ïà¹ØÎĵµ£º

mysqlÖеÄtinyint£¬smallint£¬int£¬bigint

bigint ´Ó -2^63 (-9223372036854775808) µ½ 2^63-1 (9223372036854775807) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 8 ¸ö×Ö½Ú¡£
int ´Ó -2^31 (-2,147,483,648) µ½ 2^31 - 1 (2,147,483,647) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 4 ¸ö×Ö½Ú¡£int µÄ SQL-92 ͬÒå×ÖΪ integer¡£
smallint ´Ó -2^15 (-32,768) µ½ 2^15 - 1 (32,7 ......

MYSQL³£ÓÃÃüÁîÁбí


MYSQL³£ÓÃÃüÁîÁбí
1¡¢ÏµÍ³¹ÜÀí
mysql -hÖ÷»úµØÖ· -uÓû§Ãû -p 
Á¬½ÓMYSQL£¨ÔÚmysql/bin£©
exit 
Í˳öMYSQLÃüÁî
mysqladmin -uÓû§Ãû -p¾ÉÃÜÂë passwordÐÂÃÜÂë 
ÐÞ¸ÄÃÜÂ루ÔÚmysql/bin£©
grantselect[insert][,update][,delete]onÊý¾Ý¿â.*toÓû§Ãû@localhost£¨"%"£¬ ±íʾÈκÎÖ÷»ú£©identifiedby " ......

MySQL ³£¼û´íÎó´úÂë¶ÔÕÕ±í

1005£º´´½¨±íʧ°Ü
1006£º´´½¨Êý¾Ý¿âʧ°Ü
1007£ºÊý¾Ý¿âÒÑ´æÔÚ£¬´´½¨Êý¾Ý¿âʧ°Ü
1008£ºÊý¾Ý¿â²»´æÔÚ£¬É¾³ýÊý¾Ý¿âʧ°Ü
1009£º²»ÄÜɾ³ýÊý¾Ý¿âÎļþµ¼ÖÂɾ³ýÊý¾Ý¿âʧ°Ü Chinaz.com
1010£º²»ÄÜɾ³ýÊý¾ÝĿ¼µ¼ÖÂɾ³ýÊý¾Ý¿âʧ°Ü
1011£ºÉ¾³ýÊý¾Ý¿âÎļþʧ°Ü
1012£º²»ÄܶÁȡϵͳ±íÖеļǼ
1020£º¼Ç¼Òѱ»ÆäËûÓû§ÐÞ¸Ä
10 ......

mysql µÇ¼£¬ÖØÆô

Mysql怬
µÇ¼MySQLµÄÃüÁîÊÇmysql£¬ mysql µÄʹÓÃÓï·¨ÈçÏ£º
¡¡¡¡mysql [-u username] [-h host] [-p[password]] [dbname]
¡¡¡¡username Óë password ·Ö±ðÊÇ MySQL µÄÓû§ÃûÓëÃÜÂ룬mysqlµÄ³õʼ¹ÜÀíÕʺÅÊÇroot£¬Ã»ÓÐÃÜÂ룬עÒ⣺Õâ¸örootÓû§²»ÊÇLinuxµÄϵͳÓû§¡£MySQLĬÈÏÓû§ÊÇroot£¬ÓÉÓÚ³õʼûÓÐÃÜÂ룬µÚÒ»´Î½øʱ ......

½â¾ömysql¡°Access denied for user

½â¾ömysql“Access denied for user
ÎÒµÄϵͳÊÇubuntu6.06£¬×î½üÐÂ×°ºÃµÄmysqlÔÚ½øÈëmysql¹¤¾ßʱ£¬×ÜÊÇÓдíÎóÌáʾ:
# mysql -uroot -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
ʹÓÃÍøÉϽéÉܵķ½·¨ÐÞ¸ÄrootÓû§µÄÃÜÂ룺
# mysqladmin -uroot -p p ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ