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

ʹÓÃMySQL connector/C++Á´½ÓMySQLÊý¾Ý¿â

Ê×ÏÈÈ¥MySQL¹ÙÍøÏÂÔØMySQL connector/C++
http://dev.mysql.com/downloads/connector/cpp/1.0.html
ÏÂÔصڶþ¸ö°ü£¬windows32λ·Ç°²×°°æ£¨¸öÈ˾õµÃÕâ¸ö°ü¸É¾»£©¡£Ä¿Ç°µÄ°æ±¾ÊÇConnector/C++ 1.0.5¡£
Windows (x86, 32-bit), ZIP Archive
(mysql-connector-c++-noinstall-1.0.5-win32.zip)
½«Õû¸ö°ü½âѹµ½ÏîÄ¿Îļþ¼ÐϵĵÄÔ´ÎļþĿ¼¡£Îļþ¼ÐÃû×ÖÌ«³¤£¬½«“mysql-connector-c++-noinstall-1.0.5-win32”¸ÄΪ“mysql”¡£
ÏÂÃæÒªÅäÖÃvs2008µÄ»·¾³¡£
1. ÏîÄ¿ÊôÐÔÒ³->C/C++->General->Additional Include Directories¡£½«mysql\includeĿ¼ºÍmysql\include\cppconnĿ¼Ìí¼Ó½øÈ¥¡£
2. ÏîÄ¿ÊôÐÔÒ³->Linker->General->Additional Library Directories¡£½«mysql\libĿ¼Ìí¼Ó½øÈ¥¡£
3. ÏîÄ¿ÊôÐÔÒ³->Linker->Input->Additional Dependencies¡£Ìí¼ÓÕâÁ½Ïîmysqlcppconn.lib£¬mysqlcppconn-static.lib£¨mysql\libĿ¼ÏµÄÁ½¸ö.libÎļþ£©
4. ½«mysql\libϵÄmysqlcppconn.dllÎļþ¸´ÖƵ½windows\system32Îļþ¼ÐÏ¡£
»·¾³ÅäÖÃÍê±Ï¡£
ÔÚÁ¬½ÓÊý¾Ý¿â֮ǰ£¬ÏȽ¨Á¢Ò»ÕÅ±í¡£
£¨ÆäʵÕâЩ¿ÉÒÔÔÚ´úÂëÖÐÍê³É£¬ÎÒÕâÑùÊÇΪÁËÈòâÊÔ´úÂ뾡¿ÉÄܼòÁ·Òײé´í£©
´ò¿ª¿ØÖÆ̨£¬ÊäÈëmysql -u root -p£¬ÊäÈëÃÜÂë¡£
²é¿´µ±Ç°ÒÑÓеÄÊý¾Ý¿â¡££¨SQLÓï¾äĩβ¼ÓÉÏ';'±íʾÁ¢¼´Ö´Ðе±Ç°Óï¾ä¡££©
mysql> show databases;
´´½¨Êý¾Ý¿â
mysql> create database test;
ʹÓÃÊý¾Ý¿â£¨Õâ¾ä²»Äܼӷֺţ©
mysql> use test
²é¿´ÒÑÓеıí
mysql> show tables;
´´½¨±í
mysql> create table testuser ( id INT, name CHAR(20));
²åÈëÊý¾Ý
mysql> insert into testuser(id, name) values(1001, 'google');
mysql> insert into testuser(id, name) values(1002, 'kingsoft');
mysql> insert into testuser(id, name) values(1003, 'firefox');
ÏÖÔÚÔÚC++ÖвéѯÕâЩÊý¾Ý
#include "stdafx.h"
#include <mysql_connection.h>
#include <mysql_driver.h>
#include <statement.h>
using namespace sql;
using namespace std;
void RunConnectMySQL()
{
mysql::MySQL_Driver *driver;
Connection *con;
Statement *state;
ResultSet *result;
// ³õʼ»¯Çý¶¯
driver = sql::mysql::get_mysql_driver_instance();
// ½¨Á¢Á´½Ó
con = driver->connect("tc


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

linuxÏ°²×°mysql °¢ Ìì µÄ

×î½üÏëÔÚ·þÎñÆ÷ÉÏÊÔÊÔMySQL5.1µÄ·ÖÇø£¬ÓÚÊǾÍÏë×Å×°¸öMySQL5.1£¬¾­¹ýÍ´¿àµÄÒ»¶Î¾­Àúºó£¬ÖÕÓÚÕÒ¸öÏÂÃæ×°¸öºÜºÃµÄ½Ì³Ì£¬ÌûÉÏÀ´±¸Íü¡£
1¡¢MySQLÃâ°²×°°æ/¶þ½øÖÆ°æÈí¼þ£¬²»ÓñàÒ룬ÏÂÔصØÖ·£º
     http://dev.mysql.com/downloads/
     Îļþ¸ñʽ£ºMYSQL-VERSION-OS.tar.gz
2¡ ......

PHPÖеÄMYSQL³£Óú¯Êý×ܽá

PHPÖеÄMYSQL³£Óú¯Êý×ܽá
1¡¢mysql_connect()-½¨Á¢Êý¾Ý¿âÁ¬½Ó
¸ñʽ£º
    resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
Àý£º
    $conn = @mysql_connect("localhost", "username", "password") or dir( ......

MySQLʵÏÖÊ÷µÄ±éÀú

¾­³£ÔÚÒ»¸ö±íÖÐÓи¸×Ó¹ØϵµÄÁ½¸ö×ֶΣ¬±ÈÈçempnoÓëmanager£¬ÕâÖֽṹÖÐÐèÒªÓõ½Ê÷µÄ±éÀú¡£ÔÚOracle ÖпÉÒÔʹÓÃconnect by¼òµ¥½â¾öÎÊÌ⣬²Î¼ûhttp://blog.csdn.net/ylqmf/archive/2010/01/11/5172866.aspx£¬µ«MySQL 5.1Öл¹²»Ö§³Ö£¨¾Ý˵ÒÑÄÉÈëto doÖУ©£¬Òª×Ô¼ºÐ´¹ý³Ì»òº¯ÊýÀ´ÊµÏÖ¡£
Ò»¡¢½¨Á¢²âÊÔ±íºÍÊý¾Ý£º
view plaincop ......

MySQLÑÜÉú°æ MySQL/Galera 0.7.1 ·¢²¼


Galera ÊÇÒ»Ì×ÔÚ MySQL InnoDB ÉÏÃæʵÏÖ Multi-master ÇÒ synchronous replication µÄϵ統¡£
¸Ã°æ±¾ÐÞ¸´ÁË9¸öbug£¬Ö÷ÒªÊÇ´¦Àí DDL ºÍ DML µÄ²¢·¢ÎÊÌ⣬ÁíÍâ»ù×¼MySQL°æ±¾Éý¼¶µ½ 5.1.41 ¡£
ÏÂÔصØÖ·£º http://www.codership.com/en/downloads/galera
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ