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

¡¾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 


Ïà¹ØÎĵµ£º

MYSQL[ÃüÁîÐÐÏÂ]µ¼Èëµ¼³ö´óÊý¾Ý·½·¨£¡


2007-11-16 15:37
½ñÌì¿´×ÅÊÖ²áÊÔÁËÏ£¬·¢ÏÖÔ­À´´óÊý¾Ýµ¼Èëµ¼³öÊÇÄÇôµÄÇáËÉ£¨²»ÊǺܴó£¬200¶àMµÄÎı¾¶øÒÔ£©
×¢Ò⣺Èç¹û·¢ÏÖMYSQL unknown command '\'ÕâÑùµÄÌáʾ£¬ÔòÉèÖÃһϷþÎñÆ÷µÄ×Ö·û¼¯£¬È磺
mysql -uroot -ppasspass --default-character-set=utf8 databaseName <d:bakcup.sql
ÕâÑù¾Í²»»á±¨´íÁË£¬^_^
µ¼³ö ......

WindowsÏ»·¾³±äÁ¿Ð޸ģ¨Éæ¼°MySQLÃüÁîµÄÖ±½ÓÔËÐУ©


ÓÒ¼üÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿
¿ÉÒÔ¿´µ½ÓÐÓû§±äÁ¿ºÍϵͳ±äÁ¿
ÔÚÕâÀïÎÒÃÇ¿ÉÒÔ½øÐÐÐ޸Ļ·¾³±äÁ¿
±ÈÈç˵ÎÒÃǰ²×°ÁËMySQL·þÎñÆ÷£¬Ïë½øÈëMySQLµÄÃüÁîÐеϰ¾Í±ØÐëÔËÐÐcmd
Èç¹ûûÓÐÉèÖû·¾³±äÁ¿µÄ»°ÎÒÃDZØÐë½øÈëMySQLµÄ°²×°Â·¾¶²ÅÄÜʹÓÃmysql -u root -pÕâ¸öÃüÁî
ÕâÑù»á¸øÎÒÃÇ´øÀ´ºÜ¶àÂé·³£¬ÕâʱºòÎÒÃÇÏëÔ ......

mysql ʹÓÃÏà¹Ø ³ÖÐø¸üÐÂÖÐ...

mysqlÍ£Ö¹ÃüÁî
bin/mysqladmin -uroot -p shutdown
mysqlÆô¶¯ÃüÁî
bin/mysqld_safe &
mysql ÐÞ¸ÄrootÃÜÂë
1.Í£Ö¹mysql·þÎñ
2.Æô¶¯mysql·þÎñʱ¸½¼Ó²ÎÊý
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
3.ÒÔroot½øÈëmysql
mysql -u root mysql
4.Ö´ÐÐsqlÓï¾ä
mysql> UPDATE user S ......

[ת]MySQLÊý¾Ý¿âµÄÊý¾Ý±¸·ÝºÍ»Ö¸´Ïê½â

ת:http://home.mysql.cn/space-51084-do-blog-id-43.html
±¾ÎÄÌÖÂÛ MySQL
µÄ±¸·ÝºÍ»Ö¸´»úÖÆ£¬ÒÔ¼°ÈçºÎά»¤Êý¾Ý±í£¬°üÀ¨×îÖ÷ÒªµÄÁ½ÖÖ±íÀàÐÍ£ºMyISAM ºÍ Innodb£¬ÎÄÖÐÉè¼ÆµÄ MySQL °æ±¾Îª 5.0.22¡£
Ŀǰ MySQL
Ö§³ÖµÄÃâ·Ñ±¸·Ý¹¤¾ßÓУºmysqldump¡¢mysqlhotcopy£¬»¹¿ÉÒÔÓà SQL Óï·¨½øÐб¸·Ý£ºBACKUP TABLE »òÕß SELECT ......

Mysql_ÃüÁî¹éÀà 91KGE

.Á¬½Ómysql    mysql -uroot -padmin -hlocalhost
.Á¬½ÓmysqladminÃüÁîÐпͻ§¶Ë³ÌÐò mysqladmin -uroot -padmin -hlocalhost
.Æô¶¯mysql   mysqld
.¹Ø±Õ  mysqladmin -uroot -padmin -hlocalhost shutdown
.ÐÞ¸ÄÃÜÂë
set password for 'root'@'localhost' = password('admin')
update ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ