vc6 mysql Á¬½Ó
ÔÚÄãµÄ³ÌʽÖÐʹÓÃ數據庫ÊÇ個²»錯µÄ×¢Òâ¡£Èç¹ûÒÑ經ÓпÉÓõÄMySQL·þ務Æ÷£¬ÔÚVCÖпÉÒÔ°´ÕÕÈçÏ·½·¨實現與數據庫µÄ駁½Ó¡£
1¡¢ÕÒ來MySQL(Win32)°²裝Ä¿錄ϵÄincludeÎļþ夾£¬ 將ÆäÌí¼Óµ½VC頭ÎļþÄ¿錄ÁбíÖУ»
£¨VC6 -> Options -> Directories -> ¼ÓÈë´ËÄ¿錄£©
£¨VC2005 -> ¹¤¾ß -> 選項 -> 項Ä¿ºÍ½â決·½°¸ -> VC++Ä¿錄 -> 顯ʾÒÔÏÂ內ÈݵÄÄ¿錄 -> °üº¬Îļþ -> ¼ÓÈë´ËÄ¿錄£©
2¡¢Ð½¨Ò»個¹¤³Ì£¬參¿¼ÈçÏ´ú碼£»
// mysql.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <stdio.h>
#include <winsock.h>
#include <mysql.h>
#include <windows.h>
#pragma comment(lib, "libmysql.lib")
int main(int argc, char* argv[])
...{
unsigned short Port = 3306;
char *IPAddress = "192.168.31.56";
char *UserName = "root";
char *Password = "";
char *DBName = "SAS_1_2_0";
printf("Start... ");
MYSQL *ssock;
//char execsql[500];
ssock = (MYSQL *)malloc(sizeof(MYSQL));
//ÔÚijЩ°æ±¾ÖУ¬²»ÐèÒª該³õʼ»¯¹¤×÷£¬¿É觀¿´mysql.HÒÔ¼°readme
mysql_init(ssock);
if(ssock == NULL)
...{
printf("EROR: MySQL ssock init error. ");
return FALSE;
}
//連½Óµ½Ö¸¶¨數據庫
ssock = mysql_real_connect(ssock, IPAddress, UserName, Password, NULL, Port, NULL, 0);
if(!ssock)
Ïà¹ØÎĵµ£º
±¾µØ°²×°WordPressʹÓÃxamppÎÞ·¨Æô¶¯apacheºÍmysqlµÄ½â¾ö·½·¨
½ñÌ쿪ʼװ±¾µØ²âÊÔÓõÄWordPress£¬Ñ¡Ôñxampp¼¯³É°ü¡£¿ÉÊÇ°²×°¾Í³öÎÊÌâÁË¡£
apacheºÍMySQLÀÏ°²×°Ê§°Ü£¬ºÜÊǾÀ½á···
°Ù¶ÈGoogleÁËÒ»ÍíÉÏÖÕÓÚµ·¹ÄºÃÁË¡£
ÏÂÃæÀ´ËµËµÎÒÊÇÔõô½â¾öµÄ£¬ºÍÌùÒ»·Ý¹ØÓÚÕâ¸öÎÊÌâµÄһƪÎÄÕ¡£
Ê×ÏÈ°²×°Ä¿Â¼²»¿É ......
££¶à±í²Ù×÷
Ç°ÃæÎÒÃÇÊìϤÁËÊý¾Ý¿âºÍÊý¾Ý¿â±íµÄ»ù±¾²Ù×÷£¬ÏÖÔÚÎÒÃÇÔÙÀ´¿´¿´ÈçºÎ²Ù×÷¶à¸ö±í¡£
ÔÚÒ»¸öÊý¾Ý¿âÖУ¬¿ÉÄÜ´æÔÚ¶à¸ö±í£¬ÕâЩ±í¶¼ÊÇÏ໥¹ØÁªµÄ¡£ÎÒÃǼÌÐøʹÓÃÇ°ÃæµÄÀý×Ó¡£Ç°Ã潨Á¢µÄ±íÖаüº¬ÁËÔ±¹¤µÄһЩ»ù±¾ÐÅÏ¢£¬ÈçÐÕÃû¡¢ÐԱ𡢳öÉúÈÕÆÚ¡¢³öÉúµØ¡£ÎÒÃÇÔÙ´´½¨Ò»¸ö±í£¬¸Ã±íÓÃÓÚÃèÊöÔ± ......
±ÊÕߣ¨mqboss£©½üÆÚÔÚ×öMySQL¼¯ÈºµÄ¼¼Êõµ÷ÑУ¬»á½Ðø°Ñ×Ô¼ºµÄÐĵÃÌå»áд³öÀ´ºÍ´ó¼Ò·ÖÏí£¬Çë´ó¼Ò¼ÌÐø¹Ø×¢¡£
1.´Ómysq¹Ù·½ÍøÕ¾ÏÂÔØ°²×°Îļþmysql-cluster-gpl-7.0.9-solaris10-sparc-64bit.tar.gz£¬²¢Í¨¹ýFTPÉÏ´«µ½Solaris·þÎñÆ÷ÉÏ£»
2.Ìí¼ÓÓû§×émysqlºÍÓû§mysql(×¢£ºmysqlÓû§ÊôÓÚmysqlÓû§×é)
shell> groupadd mys ......
SQL Server´´½¨ÁÙʱ±í£º
´´½¨ÁÙʱ±í
·½·¨Ò»£º
create table #ÁÙʱ±íÃû(×Ö¶Î1 Ô¼ÊøÌõ¼þ,
×Ö¶Î2 Ô¼ÊøÌõ¼þ,
.....)
create table ##ÁÙʱ±íÃû(×Ö¶Î1 Ô¼ÊøÌõ¼þ,
×Ö¶Î2 Ô¼ÊøÌõ¼þ,
.....)
·½·¨¶þ£º
select * into #ÁÙʱ±íÃû from ÄãµÄ±í;
select * into ##ÁÙʱ±íÃû from ÄãµÄ±í;
×¢£ºÒÔÉϵÄ#´ú±í¾Ö²¿ÁÙʱ±í£¬##´ú±íÈ«¾ ......
1¡¢mysql±àÒë²ÎÊý£º
#cat /usr/local/mysql/bin/mysqlbug|grep configure
# This is set by configure
CONFIGURE_LINE="./configure '--prefix=/usr/local/mysql' '--with-openssl' '--enable-thread-safe-client' '--enable-local-infile' '--with-charset=gbk' '-with-extra-charsets=gb2312,gbk'"
±íʾ±àÒëÖÐÖ§³Öope ......