mysql errno: 150 ´íÎó Íâ¼ü
ERROR 1005 (HY000): Can't create table ' ****.frm' (errno: 150)
ÎÒÊÇ´ÓÒÔϼ¸¸ö·½Ãæ½â¾öÁË´ËÎÊÌ⣺
1¡¢È·±£²ÎÕյıíºÍ×Ö¶ÎÊÇ´æÔڵģ»
2¡¢×é³ÉÍâ¼üµÄ×Ö¶ÎÒªÇó±»Ë÷Òý(Ö÷ÒªÊÇÍâ¼üÄǸö×Ö¶ÎÒªÇóÔÚÆäËû±íÖÐÊÇÖ÷¼ü)£»
3¡¢Íâ¼ü¹ØÁªµÄÁ½±í»ò¶à±íÒªÇó¶¼ÊÇINNODBÀàÐÍµÄ±í£»
4¡¢×Ö¶ÎÀàÐÍ£¨ËµÃ÷£©ÒªÒ»Ñù`itemId` varchar(36) collate utf8_bin NOT NULL default '',
5¡¢È·±£ÒÔÉÏÉùÃ÷µÄ¾ä·¨ÊÇÕýÈ·µÄ¡£
Ïà¹ØÎĵµ£º
Ò»¡¢MySQL »ñµÃµ±Ç°ÈÕÆÚʱ¼ä º¯Êý
1.1 »ñµÃµ±Ç°ÈÕÆÚ+ʱ¼ä£¨date + time£©º¯Êý£ºnow()
mysql> select now();
+---------------------+
| now() |
+---------------------+
| 2008-08-08 22:20:46 |
+---------------------+
³ýÁË now() º¯ÊýÄÜ»ñµÃµ±Ç°µÄÈÕÆÚʱ¼äÍ⣬MySQL Öл¹ÓÐÏÂÃæµÄº¯Êý£º ......
ÒÔÏÂÊÇÉæ¼°µ½²åÈë±í¸ñµÄ²éѯµÄ5ÖָĽø·½·¨£º
1)ʹÓÃLOAD DATA INFILE´ÓÎı¾ÏÂÔØÊý¾ÝÕ⽫±ÈʹÓòåÈëÓï¾ä¿ì20±¶¡£
2)ʹÓôøÓжà¸öVALUESÁбíµÄINSERTÓï¾äÒ»´Î²åÈ뼸ÐÐÕ⽫±ÈʹÓÃÒ»¸öµ¥ÐвåÈëÓï¾ä¿ì¼¸±¶¡£µ÷Õûbulk_insert_buffer_size±äÁ¿Ò²ÄÜÌá¸ß£¨Ïò°üº¬Ðеıí¸ñÖУ©²åÈëµÄËٶȡ£
3)¿ÉÒÔ¶Ômyisam±í²¢ÐвåÈëConcurrent_i ......
Ò» . °²×°ÓëÅäÖÃMYSQL
¶þ . ³£ÓÃmysqlÃüÁîÐÐÃüÁî
1 .mysqlµÄÆô¶¯ÓëÍ£Ö¹
Æô¶¯MYSQL·þÎñ net start mysql
Í£Ö¹MYSQL·þÎñ net stop mysql
2 . netstat –na | findstr 3306 ²é¿´±»¼àÌýµÄ¶Ë¿Ú , findstrÓÃÓÚ²éÕÒºóÃæµÄ¶Ë¿ÚÊÇ·ñ´æÔÚ
3 . ÔÚÃüÁîÐÐÖеǽMYSQL¿ØÖÆ̨ , ¼´Ê¹Óà MYSQL COMMEND LINE TOOL
& ......
MYSQL--my.cnfÅäÖÃÖÐÎÄÏê½â ZZ2007Äê08ÔÂ16ÈÕ ÐÇÆÚËÄ 15:53mysqld³ÌÐò--Ŀ¼ºÍÎļþ
ÒýÓÃ
basedir = path ʹÓøø¶¨Ä¿Â¼×÷Ϊ¸ùĿ¼(°²×°Ä¿Â¼)¡£
character-sets-dir = path ¸ø³ö´æ·Å×Å×Ö·û¼¯µÄĿ¼¡£
datadir = path ´Ó¸ø¶¨Ä¿Â¼¶ÁÈ¡Êý¾Ý¿âÎļþ¡£
pid-file = filename Î ......
Query ProfilerÊÇMYSQL×Ô´øµÄÒ»ÖÖqueryÕï¶Ï·ÖÎö¹¤¾ß£¬Í¨¹ýËü¿ÉÒÔ·ÖÎö³öÒ»ÌõSQLÓï¾äµÄÐÔÄÜÆ¿¾±ÔÚʲôµØ·½¡£Í¨³£ÎÒÃÇÊÇʹÓõÄexplain,ÒÔ¼°slow query log¶¼ÎÞ·¨×öµ½¾«È··ÖÎö£¬µ«ÊÇQuery ProfilerÈ´¿ÉÒÔ¶¨Î»³öÒ»ÌõSQLÓï¾äÖ´Ðеĸ÷ÖÖ×ÊÔ´ÏûºÄÇé¿ö£¬±ÈÈçCPU£¬IOµÈ£¬ÒÔ¼°¸ÃSQLÖ´ÐÐËùºÄ·ÑµÄʱ¼äµÈ¡£²»¹ý¸Ã¹¤¾ßÖ»ÓÐÔÚMYSQL 5.0.37ÒÔ ......