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

MySQL MyIsam ´æ´¢ÒýÇæË÷Òý³¤¶ÈÏÞÖÆ²âÊԼǼ

MySQL MyIsam ´æ´¢ÒýÇæÔÚ´´½¨Ë÷ÒýµÄʱºò£¬Ë÷Òý¼ü³¤¶ÈÊÇÓÐÒ»¸ö½ÏΪÑϸñµÄ³¤¶ÈÏÞÖÆµÄ£¬ËùÓÐË÷Òý¼ü×î´ó³¤¶È×ܺͲ»Äܳ¬¹ý1000£¬¶øÇÒ²»ÊÇʵ¼ÊÊý¾Ý³¤¶ÈµÄ×ܺͣ¬¶øÊÇË÷Òý¼ü×ֶζ¨Ò峤¶ÈµÄ×ܺ͡£ÏÂÃæ×ö¸ö¼òµ¥µÄ²âÊÔ£¬¼Ç¼һÏ¡£
root@sky:~# mysql -u sky -p -h127.0.0.1
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 44
Server version: 5.0.51a-log MySQL Community Server (GPL)
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
sky@127.0.0.1 : (none) 05:23:08> use test;
Database changed
sky@127.0.0.1 : test 05:23:11>
sky@127.0.0.1 : test 05:23:12>
ÏÈ´´½¨Ò»¸öMyIsam±í£¬×Ö·û¼¯Ñ¡Ôñlatin1£¬Èý¸ö×ֶξùÉèÖÃΪvarchar 255£¬£º
sky@127.0.0.1 : test 05:23:12> create table test_ind
-> (a varchar(255),
-> b varchar(255),
-> c varchar(255)
-> ) engine=myisam charset=latin1;
Query OK, 0 rows affected (0.01 sec)
´´½¨Ð§¹û£º
sky@127.0.0.1 : test 05:23:32> show create table test_ind\G
*************************** 1. row ***************************
Table: test_ind
Create Table: CREATE TABLE `test_ind` (
`a` varchar(255) default NULL,
`b` varchar(255) default NULL,
`c` varchar(255) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
Èý¸ö×Ö¶ÎÁªºÏË÷Òý£¨³¤¶ÈÓ¦¸ÃÔÚ1000ÒÔÄÚ£©
sky@127.0.0.1 : test 05:23:41> create index test_a_b_c_ind on test_ind(a,b,c);
Query OK, 0 rows affected (0.01 sec)
Records: 0 Duplicates: 0 Warnings: 0
ÎÒÃÇ¿´µ½£¬´´½¨³É¹¦ÁË¡£
ÏÂÃæÎÒÃÇ×öÒ»´Î×Ö·û¼¯×ª»»£¬½«×Ö·û¼¯×ª»»³Éutf8
sky@127.0.0.1 : test 05:25:54> alter table test_ind convert to charset utf8;
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes
sky@127.0.0.1 : test 05:26:24>
sky@127.0.0.1 : test 05:28:03> show create table test_ind\G
*************************** 1. row ***************************
Table: test_ind
Create Table: CREATE TABLE `test_ind` (
`a` varchar(255) default NULL,
`b` varchar(255) default NULL,
`c` varcha


Ïà¹ØÎĵµ£º

mysqlµÄÖÐÎÄÂÒÂëÎÊÌâ

 Õâ¶Îʱ¼ä±»Õâ¸öÀ§ÈÅÁ˺ܾã¬Í¨¹ýÐÞ¸ÄÅäÖÃÎļþ£¬ÖÕÓÚ°ÑÕâ¸öÎÊÌâ½â¾öÁË¡£
×Ô¼ºÔÚÍøÉÏÒ²ÕÒÁËºÜ¶à¹ØÓÚ½â¾öÕâ¸öÎÊÌâµÄ·½·¨£¬µ«ÊǶ¼½²µÄ²»Ì«Çå³þ£¬ËùÒÔ½ñÌìÔÚÕâÖØÐÂ˵ÏÂÕâ¸öÎÊÌâ¡£
ÎҵĽâ¾ö·½·¨ÊÇͨ¹ýÐÞ¸ÄmysqlµÄÅäÖÃÎļþmy.ini£¬·½·¨ÈçÏ£º
ÔÚmy.iniÖпÉÒÔ·¢ÏÖÓÐÕâôһ¶Î´úÂ룺
[client]
port=3306
[mysql]
default ......

ʹÓÃWAMP5´î½¨Apache+MySQL+PHP»·¾³

 Ä¿Ç°Óв»ÉÙAMP£¨Apache\MySQL\PHP£©µÄ¼¯³ÉÈí¼þ£¬¿ÉÒÔÈÃÎÒÃÇÒ»´Î°²×°²¢ÉèÖúá£Õâ¶ÔÓÚ²»ÊìϤAMPµÄÓû§À´Ëµ£¬ºÃ´¦¶à¶à¡£
Ò»¡¢Ê¹ÓÃAMP¼¯³ÉÈí¼þµÄÓŵ㣺
1¡¢¿É±ÜÃâÓÉÓÚȱ·¦AMPµÄ֪ʶ£¬¶øÎÞ·¨ÕýÈ·ÉèÖû·¾³£»
2¡¢¿É¿ìËÙ°²×°²¢ÉèÖúÃAMP»·¾³£¬ÈÃÎÒÃÇÖ±½Ó¿ªÊ¼ÕæÕý¸ÐÐËȤµÄÈí¼þ£¬Èçxoops£»
3¡¢¿É·½±ãµÄ´î½¨²âÊÔ»·¾³£¬¶ÔÓÚ² ......

ÈçºÎÉèÖÃMySQLͬ²½(Replication)

×÷ÕߣºÒ¶½ðÈÙ£¨Email: imysql#gmail.com£©£¬À´Ô´£ºhttp://iMySQL.cn£¬×ªÔØÇë×¢Ã÷×÷Õߺͳö´¦£¬²¢ÇÒ²»ÄÜÓÃÓÚÉÌÒµÓÃ;£¬Î¥Õ߱ؾ¿¡£
MySQLÌṩÁËÊý¾Ý¿âµÄͬ²½¹¦ÄÜ£¬Õâ¶ÔÎÒÃÇʵÏÖÊý¾Ý¿âµÄÈßÔÖ¡¢±¸·Ý¡¢»Ö¸´¡¢¸ºÔؾùºâµÈ¶¼ÊÇÓм«´ó°ïÖúµÄ¡£±¾ÎÄÃèÊöÁ˳£¼ûµÄͬ²½ÉèÖ÷½·¨¡£
Ò»¡¢×¼±¸·þÎñÆ÷
ÓÉÓÚMySQL²»Í¬°æ±¾Ö®¼äµÄ(¶þ½øÖÆÈÕÖ¾)b ......

¿ìËÙÖØÖÃMySQLÓû§ÃÜÂë

 
1¡¢Í£Ö¹ÕýÔÚÔËÐеÄMySQL½ø³Ì
    
LinuxÏÂ,ÔËÐÐ killall -TERM mysqld
     WindowsÏ£¬Èç¹ûд³É·þÎñµÄ¿ÉÒÔÔËÐУºnet stop mysql,Èçδ¼ÓÔØÎª·þÎñ£¬¿ÉÖ±½ÓÔÚÈÎÎñ¹Ü  ÀíÆ÷ÖнøÐйرա£
2¡¢ÒÔ°²È«Ä£Ê½Æô¶¯MySQL
    
LinuxÏ£¬ÔËÐÐ mysqld_sa ......

½éÉÜmysqlÊý¾Ý¿âÏÂshowÃüÁîµÄÖ÷ÒªÓ÷¨


¡¡¡¡
¡¡¡¡±¾ÎÄÖ÷Òª½éÉÜmysqlÊý¾Ý¿âÏÂshowÃüÁîµÄÖ÷ÒªÓ÷¨£º
¡¡¡¡a. show tables»òshow tables from database_name; -- ÏÔʾµ±Ç°Êý¾Ý¿âÖÐËùÓбíµÄÃû³Æ¡£
¡¡¡¡b. show databases; -- ÏÔʾmysqlÖÐËùÓÐÊý¾Ý¿âµÄÃû³Æ¡£
¡¡¡¡c. show columns from table_name from database_name; »òshow columns from database_name.table_n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ