VCµ¥ÎļþÁ¬½ÓMYSQLʾÀý£¬¶ªµôlibmysql.dll.
ÍøÉϺܶàVCÁ¬½ÓmysqlµÄÀý×Ó¶¼ÊÇÒª´ø¸ölibmysql.dll²ÅÄÜÕý³£Ê¹Óõġ£
µ«ÓÐʱÎÒÃDz¢²»Ïë¶à´ø¸ölibmysql.dll£¬Ö»Ïëµ¥Îļþ¾ÍÄÜʹÓûòÕßÄãÊÇÒª
·â×°ÔÚÒ»¸ödllÎļþÀÕâʱÄãÒª¾ÍÓõ½mysqlclient.libÕâ¸ö¾²Ì¬¿âÁË¡£
ʾÀý´úÂëÈçÏ£¬ºÜºÜ¼òµ¥£¬¾Í²»¶à˵ÁË¡£
Ïà¹ØµÄmysqlÍ·Îļþ¼°¾²Ì¬¿â£º
http://download.csdn.net/source/1047386
#include "stdafx.h"
#include <windows.h>
#include <winsock2.h>
#include "mysql\include\mysql.h"
//ºöÂÔLIBCMT.lib, MSVCRTD.libÕâЩ¿â£¬²»È»Á´½Óʱ»á±¨lnk2005´íÎó
#pragma comment(linker,"/nodefaultlib:LIBCMT.lib")
#pragma comment(linker,"/nodefaultlib:MSVCRTD.lib")
/*ÓÃmysqlclient.lib,²»ÒªÓÃlibmysql.lib,Òª²»ÄãÒª¶à´øÒ»¸ölibmysql.dll
¾²Ì¬¿âÓÐÁ½¸ö£¬Ò»¸öÊÇdebug°æµÄ£¬Ò»¸öÊÇrelease°æµÄ£¬Òª×¢Òâ
*/
#if defined _DEBUG
#pragma comment(lib, "mysqlclient_debug.lib")
#else
#pragma comment(lib, "mysqlclient.lib")
#endif
#pragma comment(lib, "wsock32.lib")
#pragma comment(lib, "Advapi32.lib")
int _tmain(int argc, _TCHAR* argv[])
{
MYSQL* mysql = NULL;
mysql = mysql_init(mysql);
MYSQL_RES* res;
MYSQL_ROW record;
mysql_real_connect(mysql, "192.168.0.240", "root","root", "amx", 3306, NULL, NULL);
mysql_query(mysql, "select auth, password, access from admins where length(access)>3");
res = mysql_store_result(mysql);
while((record=mysql_fetch_row(res)))
{
printf("auth=%s,password=%s,access=%s\n", record[0], record[1], record[2]);
}
mysql_free_result(res);
mysql_close(mysql);
return 0;
}
Ïà¹ØÎĵµ£º
1¡¢½¨Á¢ÁËÒ»¸öj2eeÏîÄ¿¡£
2¡¢½«mysqlµÄjdbcÇý¶¯¿½±´µ½WebContent / WEB-INF/ lib Ŀ¼Ï¡£
3¡¢ÔÚÇý¶¯jar°üÉϵãÓÒ¼ü½«jar°üÌí¼Óµ½¹¹½¨Â·¾¶ÖС£
4¡¢È»ºó±àдÓëÊý¾Ý¿âÏà¹ØµÄ´úÂë¡£
5¡¢ÔÚʵÏÖÀàÖÐÌí¼Ómain·½·¨½øÐе¥Ôª²âÊÔ£¬¸÷¸ö·½·¨¶¼ÄÜÕý³£ÔËÐС£
6¡¢´´½¨jspÒ³ÃæÔÚÆäÖд´½¨¶ÔÏóµ÷Óòéѯ·½·¨¡£²úÉú´íÎó¡£
cn.guopeng.bbs ......
http://www.xhsd.com.cn/books/views.asp?plucode=711126281
Õâ±¾Êé±»³ÆΪPHPºÍMySQLµÄ“Ê¥¾”£¬×Ðϸ¿´ÁËһϣ¬µÄÈ·Óкܶà¶Àµ½µÄµØ·½¡£
Ê×ÏÈ£¬ÄÚÈÝÃ÷È·Í»³ö¡£Õâ±¾ÊéµÄÄ¿µÄÊǶÔPHPºÍMySQL×öÉîÈëdz³öµÄ·ÖÎö£¬¶ÔÆäWebÓ¦ÓÃ×öÁ˽ÏÈ«ÃæµÄ²ûÊö£¬Àý×Ó¾µäʵÓá£
Æä´Î£¬Ð¡£PHP5.3£¬MySQLµÄ´æ´¢¹ý³ÌºÍ´æ´¢ÒýÇ棬Ajax¼¼ ......
·ÀÖ¹×¢ÈëµÄ¼¸ÖÖ°ì·¨
ÆäʵÔÀ´¾ÍÊÇÎÒÃÇÐèÒª¹ýÂËһЩÎÒÃdz£¼ûµÄ¹Ø¼ü×ֺͷûºÏÈ磺
Select£¬insert£¬update£¬delete£¬and£¬*£¬µÈµÈ
function inject_check($sql_str) {
return eregi('select|insert|update|delete|\'|\/\*|\*|\.\.\/|\.\/|union|into|load_file
|outfile', $sql_str); & ......
1.ÔÚORACLEÖÐÓÃselect * from all_usersÏÔʾËùÓеÄÓû§£¬¶øÔÚMYSQLÖÐÏÔʾËùÓÐÊý¾Ý¿âµÄÃüÁîÊÇshow
databases¡£¶ÔÓÚÎÒµÄÀí½â£¬ORACLEÏîÄ¿À´ËµÒ»¸öÏîÄ¿¾ÍÓ¦¸ÃÓÐÒ»¸öÓû§ºÍÆä¶ÔÓ¦µÄ±í¿Õ¼ä£¬¶øMYSQLÏîÄ¿ÖÐÒ²Ó¦¸ÃÓиöÓû§ºÍÒ»¸ö¿â¡£ÔÚ
ORACLE(db2Ò²Ò»Ñù)Öбí¿Õ¼äÊÇÎļþϵͳÖеÄÎïÀíÈÝÆ÷µÄÂß¼±íʾ£¬ÊÓͼ¡¢´¥·¢Æ÷ºÍ´æ´¢¹ý³ÌÒ²¿É ......
½ñÌ죬ÓÃNavicatΪÁ½ÕÅ±í½¨Á¢Í⽡¹Øϵ£¬×ÜÊÇÌáʾ´´½¨Ê§°ÜÐÅÏ¢£¬·¢ÏÖÊÇÁ½Õűí¹ØÁªµÄ×Ö¶ÎÀàÐÍÎÊÌ⣬µ«Á½¸ö×ֶζ¼ÊÇintÐÍÁ¨£¬Ôõô»á»¹»áÀàÐͲ»Ò»ÖÂÄØ£¬×îºó·¢ÏÖµ½Ò»¸öµØ·½Óе㲻һÑù£¬¾ÍÊÇÔÚ“Éè¼Æ±í”½çÃæÏ·½Óиö“ÎÞ·ûºÅ”µÄ¸´Ñ¡¿ò£¬Á½ÕűíµÄÖ÷¼ü×Ö¶ÎÆäÖÐÒ»¸öû¹´Ñ¡ÉÏÕâ¸ö¸´Ñ¡¿ò¶øµ¼ÖÂËäÈ»¶¼ÊÇintÀàÐÍ£ ......