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¡¢È·±£ÒÔÉÏÉùÃ÷µÄ¾ä·¨ÊÇÕýÈ·µÄ¡£
ÔÎÄÁ´½Ó£ºhttp://blog.csdn.net/alen1985/archive/2009/12/14/5002203.aspx
×÷ÕߣºAlen
Ïà¹ØÎĵµ£º
½â¾öhibernate+mysql³öÏֵĸôÌìÁ¬½Ó³¬Ê±ÎÊÌâ
³öÏÖ´íÎó£ºSQL Error: 0, SQLState: 08S01
Communications link failure due to underlying exception:
** BEGIN NESTED EXCEPTION **
java.net.SocketException
MESSAGE: Software caused connection abort: socket write error
STACKTRACE:
java.net.SocketExcepti ......
½â¾ömySQLÕ¼ÓÃÄڴ泬´óÎÊÌâ
ΪÁË×°mysql»·¾³²âÊÔ£¬×°ÉϺó·¢ÏÖÆô¶¯ºómysqlÕ¼ÓÃÁ˺ܴóµÄÐéÄâÄڴ棬´ï8°Ù¶àÕס£ÍøÉÏËÑË÷ÁËһϣ¬µÃµ½¸ßÈËÖ¸µãmy.ini¡£ÔÙҲû¼ûÔÙÏêϸµÄÁË..Ö»ºÃ´ò¿ªmy.iniÖðÐеĿУ¬ËäȻӢÎIJîÁ˵㣬²»¹ý¶àÉÙM»¹ÊÇ¿´µÃÃ÷µÄ^-^
¸ü¸ÄºóÈçÏ£º
innodb_buffer_pool_size=576M ->256M InnoDBÒýÇ滺³å ......
DATETIME¡¢DATE ºÍ TIMESTAMP ÀàÐÍÊÇÏàËƵġ£±¾ÆªÃèÊöÁËËüÃǵÄÌØÐÔÒÔ¼°ËüÃǵÄÏàËƵãÓ벻ͬµã¡£
DATETIME ÀàÐÍ¿ÉÓÃÓÚÐèҪͬʱ°üº¬ÈÕÆÚºÍʱ¼äÐÅÏ¢µÄÖµ¡£MySQL ÒÔ 'YYYY-MM-DD HH:MM:SS' ¸ñʽ¼ìË÷ÓëÏÔʾ DATETIME ÀàÐÍ¡£Ö§³ÖµÄ·¶Î§ÊÇ '1000-01-01 00:00:00' µ½ '9999-12-31 23:59:59'¡£(“Ö§³Ö”µÄº¬ÒåÊÇ£¬¾¡¹Ü¸üÔ ......
ÁíÍâMySql¹Ù·½³öÁËÒ»¸öÔÚcsharpÀïÃæÁ¬½ÓMySqlµÄConnector£¬¿ÉÒÔÊÔÊÔ
http://dev.mysql.com/downloads/#connector-net
<add name="mysql" connectionString="server=125.46.37.170;uid=root;pwd=;"/>
±¨´í£ºUnable to connect to any of the specified MySQL hosts.
½ñÌì×öÏîĿʱºò¾ÍÓöµ½ÕâÎÊ ......
¼ÙÉèÎÒÃÇʹÓÃmysql_real_queryÖ´ÐÐÁËÒ»ÌõsqlÓï¾äÖ®ºó£¬·µ»ØֵΪ·Ç0Öµ£¬´ó¼Ò¶¼ÖªµÀÕâÊÇÕâÌõÓï¾äÖ´Ðгö´í£¬µ«ÊÇÎÒÃÇÏë
Á˽âµØ¸üÏêϸµãµÄ»°£¬¾¿¾¹ÊÇʲôÔÒòµ¼ÖÂÁËÕâ¸ö´íÎóÄØ£¿Õâʱºò¾ÍµÃÓÃÉÏmysqlÌṩµÄÁíÍâÒ»¸öAPI£ºmysql_errno¡£
mysql_errno»áÌṩ×î½üÒ»´Îµ÷ÓõÄC API³ö´íµÄÐÅÏ¢£¨²»¼ûµÃÿ¸öAPI¶¼»á¶ÔÕâ¸öerrno½øÐÐÉèÖ ......