mysqlµÇ²»ÉÏ
ÎÒ×°ÍêMysql£¬½øMySQL Command Line Client¸ÕÊäÈëÃÜÂëÒ»»Ø³µ¾Í³öÏÖConnection error 2013: Lost connection to MySQL server during query¡£ÉÁһϾÍûÁË¡£ÕâÓ¦¸ÃÊÇ´íÎóÈÕÖ¾£º
InnoDB: The first specified data file .\ibdata1 did not exist:
InnoDB: a new database to be created!
100309 16:28:43 InnoDB: Setting file .\ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
100309 16:28:43 InnoDB: Log file .\ib_logfile0 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile0 size to 10 MB
InnoDB: Database physically writes the file full: wait...
100309 16:28:44 InnoDB: Log file .\ib_logfile1 did not exist: new to be created
InnoDB: Setting log file .\ib_logfile1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
100309 16:28:44 InnoDB: Started; log sequence number 0 0
100309 16:28:44 [Note] C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld-nt: ready for connections.
Version: '5.0.22-community-nt' socket: '' port: 3306 MySQL Community Edition (GPL)
ºÜÍ·ÌÛ£¬×°Á˼¸´Î¶¼ÕâÑù¡£ÓÐʲôºÃ°ì·¨£¿
²»¶®£¬°ï¶¥°É£¡ÊDz»ÊÇÄãÒÔǰûж¸É¾»Ñ½£¡
°Ù¶ÈһϠºÃÏñÐèÒª¸Ä Á¬½Ó³¬Ê±µÄ²ÎÊý¡£¡£
È¥ÆäËûÊý¾Ý¿â/MySqlÇøÎÊÎÊ¿´¡£
lost connectionÒԺ󣬷þÎñÊÇ
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÓÃmysql×Ô´øµÄC API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))
{
AfxMessageBox("Êý¾Ý¿âÁ¬½Óʧ°Ü") ......
ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË
¼Æ»®ÈÎÎñ...php....sql...truncate....OK
Äã¾ÍÕâ½ÓÔÚҳà ......
ÎÒµÄMysql ʹÓõÄʱºò ÓÃdos½¨Á¢µÄÊý¾Ý±í ÔÚdosÖÐÄÜÏÔʾ³öÖÐÎÄ
µ«ÊÇÔÚ ÆäËûµÄ¿ÉÊÓÒ³Ãæ ºÍÍøÒ³Öж¼ÏÔʾÂÒÂë ÈçºÎ½â¾ö£¿
ÔÚmysql¿ØÖÆÌ¨:show variables like 'char%';Ìù½á¹û³öÀ´¿´¿´¡£
mysqlÃüÁîÐÐģʽÏÂ: ......
try
{
sql::Driver *driver;
sql::Connection *con;
//´´½¨Á¬½Ó
driver = get_driver_instance();
con = driver->connect("tcp://192.168.18.52:3306", "root", "1234 ......