ʵÔÚûÕÞÁË,Çó¾È
дÁËÒ»¸ö¼òµ¥µ½¼«µãµÄMYSQL¿Í»§³ÌÐò--ËüÁ¬½ÓÒ»¸ö·þÎñÆ÷.¶Ï¿ªÁ¬½Ó.Í˳ö.±àÒëͨ¹ý,²¢Éú³É¿ÉÔËÐÐÎļþ,¿ÉÔÚ\ÔËÐÐʱȴ³öÏÖ
./myclient: error while loading shared libraries: libmysqlclient.so.14: cannot open shared object file: No such file or directory
´úÂëÈçÏÂ:
#include <my_global.h>
#include <mysql.h>
static char *opt_host_name=NULL;
static char *opt_user_name=NULL;
static char *opt_password=NULL;
static unsigned int opt_port_num=0;
static char *opt_socket_name=NULL;
static char *opt_db_name=NULL;
static unsigned int opt_flags=0;
static MYSQL *conn;
int main(int argc,char *argv[])
{
conn=mysql_init(NULL);
mysql_real_connect(conn,opt_host_name,opt_user_name,opt_password,opt_db_name,opt_port_num,opt_socket_name,opt_flags);
mysql_close(conn);
exit(0);
}
Ò³:
[1]