¡¾MySQLÊý¾ÝÀàÐÍ1Ö® ÊýÖµÀàÐÍ¡¿
MySQL»ù±¾ÊýÖµÀàÐÍ´óÖ¿ÉÒԷֳɣº
ÕûÊýÀàÐÍ£ºTINYINT¡¢SAMLLINT¡¢MEDIUMINT¡¢INT¡¢BIGINT--1×Ö½Ú¡¢2¡¢3.¡¢4¡¢8
¸¡µãÊýÀàÐÍ£ºFLOAT(m,d)¡¢DOUBLE(m,d)==REAL-4×Ö½Ú¡¢8
¶¨µãÊýÀàÐÍ£ºDECIMAL(m,d)¡¢NUMERIC-m+2×Ö½Ú¡¢8
λÀàÐÍ£ºBIT(m)-1-8×Ö½Ú
¸÷¸öÀàÐ͵ÄÏêϸ·¶Î§¿ÉÒԲο¼mysqlÎĵµ
Êý¾ÝÀàÐÍСÀý£º
1.ÕûÊýÀàÐÍ
create table t1
(
id int,
id2 int(4)
);
insert t1 select 1,2;
select * from t1;
+------+------+
| id | id2 |
+------+------+
| 1 | 2 |
+------+------+
alter table t1 modify id int zerofill;
alter table t1 modify id2(4) int zerofill;
select * from t1;
+------------+------------+
| id | id2 |
+------------+------------+
| 0000000001 | 0002 |
+------------+------------+
insert t1 select 1,11111;
Select * from t1;
+------------+------------+
| id | id2 |
+------------+------------+
| 0000000001 | 0002 |
| 0000000001 | 11111 |
+------------+------------+
insert t1 select -1,-2;
+-------+------+---------------------------------------------+
| Level | Code | Message |
+-------+------+---------------------------------------------+
| Error | 1264 | Out of range value 
Ïà¹ØÎĵµ£º
use mysql
update user set Password=password('newpassword') where User='root';
flush privileges;
Ê×ÏÈÒªÉùÃ÷Ò»µã£¬´ó²¿·ÖÇé¿öÏ£¬ÐÞ¸ÄMySQLÊÇÐèÒªÓÐmysqlÀïµÄrootȨÏ޵ģ¬
ËùÒÔÒ»°ãÓû§ÎÞ·¨¸ü¸ÄÃÜÂ룬³ý·ÇÇëÇó¹ÜÀíÔ±¡£
·½·¨Ò»
ʹÓÃphpmyadmin£¬ÕâÊÇ×î¼òµ¥µÄÁË£¬ÐÞ¸Ämysql¿âµ ......
ÈçÈô×ªÔØ£¬Çë×ðÖØ¸öÈËÀͶ¯£¬Îñ±Ø×¢Ã÷Ôʼ³ö´¦£º(http://blog.csdn.net/iihero/archive/2010/05/13/5585039.aspx)
±¾ÎÄΪiihero@CSDNÔ´´¡£
ÔÚǰһƪ¶ÌÎÄÀïÌáµ½ÁËmy.ini/cnfµÄ¼ÓÔØË³Ðò£ºC:\WINDOWS\my.cnf->C:\WINDOWS\my.ini->C:\my.cnf ->C:\my.ini ->$installdir\my.ini¡£(%MYSQL_HOME%\my.ini)-> ......
¡¡Ò»Ö±À§ÈÅÎÒ¿ì°ëÄêµÄÎÊÌâÖÕÓڵõ½½â¾ö, ·þÎñÆ÷µÄmysqlÀÏÊÇÔËÐÐÒ»¶Îʱ¼ä,×Ô¶¯Í£Ö¹ÁË,±ØÐëÊÖ¶¯Æô¶¯. !
¡¡¡¡ÎÒÕÒÆ«ÍøÉÏËùÓеķ½·¨,µ«Ã»ÓÐÒ»¸öÄܽâ¾ö,ʲôÐÞ¸ÄÅäÖÃÎļþ°¡.¶¨Ê±Æô¶¯.¶¼Ã»Ð§¹û. ¸ù¾Ýר¼Ò¹Û²ì£¬ÕâÑùµÄÀíÂÛºÍÏÖÏó¶¼ÊÇÖµµÃ¸÷λվ³¤Éî˼µÄ£¬ËùÒÔÏ£Íû´ó¼Ò¶à×öÑо¿Ñ§Ï°£¬ÕùÈ¡×ܽá³ö¸ü¶à¸üºÃµÄ¾Ñé!
¡¡¡¡Õâ¸ö·½·¨ÊÇÎÒ ......
¾ÍÏóÐí¶àµÄPHP¿ª·¢ÕßÒ»Ñù£¬ÔÚ¸Õ¿ªÊ¼½¨Á¢¶¯Ì¬ÍøÕ¾µÄʱºò£¬ÎÒ¶¼ÊÇʹÓÃÏà¶Ô¼òµ¥
µÄÊý¾Ý½á¹¹¡£PHPÔÚÁ¬½ÓÊý¾Ý¿â·½ÃæµÄȷʵÊÇÊ®·Ö·½±ã£¨ÒëÕß×¢£ºÓÐЩÈËÈÏΪPHPÔÚÁ¬½Ó²»Í¬Êý¾Ý¿âʱûÓÐÒ»¸öͳһµÄ½Ó¿Ú£¬²»Ì«·½±ã£¬ÆäʵÕâ¿ÉÒÔͨ¹ýһЩÀ©
Õ¹¿âÀ´×öµ½ÕâÒ»µã£©£¬ÄãÎÞÐè¿´´óÁ¿µÄÉè¼ÆÎĵµ¾Í¿ÉÒÔ½¨Á¢ºÍʹÓÃÊý¾Ý¿â£¬ÕâÒ²ÊÇPHP»ñµÃ³É¹¦µÄÖ÷ ......
MySQL EVENT
À´Ô´£ºhttp://samyu.blog.51cto.com/344284/146011
event_scheduler:
The MySQL event scheduler is a thread that runs in the background looking for events to execute. It spends a lot of time sleeping -- and won't do anything unless the new global variable "event_scheduler" is set t ......