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

linux Ï ÓÃcÓïÑÔ´´½¨mysqlÊý¾Ý¿â±Ê¼Ç£¨¶þ£©

linux Ï ÓÃcÓïÑÔ´´½¨mysqlÊý¾Ý¿â±Ê¼Ç£¨¶þ£©
                       
£­£­£­£­£­£­£­Á½¸ö¼òµ¥µÄÀý×Ó£¬¹©²Î¿¼±È½Ï
¡¶ÀýÒ»¡·
#include <stdio.h>
#include <stdlib.h>
#include
"/usr/include/mysql/mysql.h"      
int main(){
MYSQL my_connection;
int res;
mysql_init(&my_connection);
if(mysql_real_connect(&my_connection,"localhost","root","123","data",0,NULL,CLIENT_FOUND_ROWS)){
printf("connection success\n");
res= mysql_query(&my_connection,"select * from
ip");
  if(!res){
     
printf("%lu",(unsigned
long)mysql_affected_rows(&my_connection));
}
  else{
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
 
mysql_close(&my_connection);
}
else{
   fprintf(stderr,"connection
Failed\n");
 
if(mysql_errno(&my_connection)){
   fprintf(stderr,"insert error
%d:%s\n",mysql_errno(&my_connection),
mysql_error(&my_connection));
}
}
 return EXIT_SUCCESS;
}
±àÒ룺
 gcc -o mysql.out mysql.c -L /usr/lib/mysql/ -l
mysqlclient
¡¶Àý¶þ¡·
#include<stdio.h>
#include<stdlib.h>
#include"/usr/include/mysql/mysql.h"      
int main(int argc,char**argv)
{
    MYSQL
*sql_p;
    MYSQL_RES
*result_p;
    MYSQL_ROW
row_p;
    int
res;
   
sql_p=mysql_init(NULL);
   
if(sql_p==NULL){
       
printf("Init error!\n");
       
exit(1);
    }
   
sql_p=mysql_real_connec


Ïà¹ØÎĵµ£º

MySQLѧϰ

×öÈí¼þÊý¾Ý¿â±Ø²»¿ÉÉÙ£¬ÎÒÑ¡ÔñÁËMySQL¡£
Ê×Ïȵ½http://dev.mysql.com/downloads/ÏÂÔغÃMySQL5.1ºÍMySQL GUI TOOLS
ϵ½µçÄÔÉÏ,È»ºó°²×°£¬ÏÈ×°5.1ÔÙ×°gui tools ,һ·ȷ¶¨°É¡£
ŪºÃºó£¬µã¿ªMySQL Query Browser£¬¾Í¿ÉÒÔ²Ù×÷Êý¾Ý¿âÁË¡£
MySQLµÄÇý¶¯³ÌÐòÊÇGUITOOLS°²×°Ä¿Â¼/java/libϵÄmysql-connector-java-5.0.4-bin.ja ......

java µ÷ÓÃÃüÁî ±¸·ÝmysqlÊý¾Ý¿â

 ´úÂëÈçÏ£º
  1  String command  =   " cmd /c C:/Program Files/MySQL/MySQL Server 5.0/bin>mysqldump -h localhost -u root -p aijia > E:/aijia.dmp " ;
  2      try    {
  3     Process process& ......

mysql´íÎó¼°½â¾öÈ«¹¥ÂÔ

10055:ûÓлº´æ¿Õ¼ä¿ÉÀûÓà  ·½·¨:²é¿´ÏÂÄãµÄCÅÌ¿Õ¼äÊÇ·ñÒѾ­Âú,Çå³ýһЩûÓÐÓõÄÎļþ.   ¿ÉÒÔÔÚºǫ́µÄ"ÂÛ̳ºËÐÄÉèÖÃ","ºËÐŦÄÜÉèÖÃ"Àï"½ø³ÌÓÅ»¯"¿ªÆô,"GZIP ѹËõÊä³ö"¹Ø±Õ. ²éÕÒÁËÒ»ÏÂ10055£¨Ã»Óлº´æ
˵Ã÷:Èç¹ûÓöµ½Êý¾Ý¿â³ö´íµÄÎÊÌâÐÞ¸ÄÏàÓ¦µÄ´úÂëºóÒ»°ãÒªÖØÆômysql¡£Èç¹ûÓöµ½mysqlµÄÎÊÌâ¿ÉÒÔÏÈÖØÆ ......

ÏêÊöÈçºÎÌá¸ßMySQLÖÐÊý¾Ý×°ÔØЧÂÊ

Õª³­×Ô£ºhttp://database.ctocio.com.cn/153/9232653.shtml
ºÜ¶àʱºò¹ØÐĵÄÊÇÓÅ»¯SELECT ²éѯ£¬ÒòΪËüÃÇÊÇ×î³£ÓõIJéѯ£¬¶øÇÒÈ·¶¨ÔõÑùÓÅ»¯ËüÃDz¢²»×ÜÊÇÖ±½ØÁ˵±¡£Ïà¶ÔÀ´Ëµ£¬½«Êý¾Ý×°ÈëÊý¾Ý¿âÊÇÖ±½ØÁ˵±µÄ¡£È»¶ø£¬Ò²´æÔÚ¿ÉÓÃÀ´¸ÄÉÆÊý¾Ý×°ÔزÙ×÷ЧÂʵIJßÂÔ£¬Æä»ù±¾Ô­ÀíÈçÏ£º
¡¡¡¡³ÉÅú×°Ôؽϵ¥ÐÐ×°Ôظü¿ì£¬ÒòΪÔÚ×°ÔØÿ¸ö¼Ç ......

MySql ×Ö·û´®º¯Êý


MySql ×Ö·û´®º¯Êý
[ 2006-04-22 19:24:44 | Author: Ychon ]
Font Size: Large | Medium | Small
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str)
·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ