<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Howto: Connect MySQL server using C program API under Linux or UNIX</title> <atom:link href="http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: sabari</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175713</link> <dc:creator>sabari</dc:creator> <pubDate>Thu, 17 Nov 2011 06:36:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175713</guid> <description>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL please answer this question please...pls send the coding to my mail pls... sabarinathan67@gmail.com... its very urgent...</description> <content:encoded><![CDATA[<p>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL please answer this question please&#8230;pls send the coding to my mail pls&#8230; <a
href="mailto:sabarinathan67@gmail.com">sabarinathan67@gmail.com</a>&#8230; its very urgent&#8230;</p> ]]></content:encoded> </item> <item><title>By: rehman</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175641</link> <dc:creator>rehman</dc:creator> <pubDate>Sun, 13 Nov 2011 10:08:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175641</guid> <description>please explain allthese code and mysqlmethods</description> <content:encoded><![CDATA[<p>please explain allthese code and mysqlmethods</p> ]]></content:encoded> </item> <item><title>By: shalini</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175414</link> <dc:creator>shalini</dc:creator> <pubDate>Thu, 03 Nov 2011 04:52:05 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175414</guid> <description>which is the best development tools used to connect mysql server.</description> <content:encoded><![CDATA[<p>which is the best development tools used to connect mysql server.</p> ]]></content:encoded> </item> <item><title>By: Rick</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175030</link> <dc:creator>Rick</dc:creator> <pubDate>Thu, 20 Oct 2011 15:56:24 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-175030</guid> <description>I&#039;ve compiled fine under QNX with
cc -o test $(mysql_config --cflags) test.c $(mysql_config --libs)
be sure your dev libraries are installed, Jesus your code shows some weird characters -&gt;&gt; âprintfâ
Best Regards</description> <content:encoded><![CDATA[<p>I&#8217;ve compiled fine under QNX with</p><p>cc -o test $(mysql_config &#8211;cflags) test.c $(mysql_config &#8211;libs)</p><p>be sure your dev libraries are installed, Jesus your code shows some weird characters -&gt;&gt; âprintfâ</p><p>Best Regards</p> ]]></content:encoded> </item> <item><title>By: Adolfo Hernandez</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-174903</link> <dc:creator>Adolfo Hernandez</dc:creator> <pubDate>Sun, 16 Oct 2011 22:50:20 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-174903</guid> <description>pleased
I&#039;m compiling as follows:
gcc -o jesus $(/usr/local/src/inser_m_c/mysql/bin/mysql_config --cflags) jesus.c $(/usr/local/src/inser_m_c/mysql/bin/mysql_config --libs)
It has an error
jesus.c: In function âmainâ:
jesus.c:25: warning: passing argument 1 of âprintfâ from incompatible pointer type
jesus.c:31: warning: passing argument 1 of âprintfâ from incompatible pointer type
/usr/bin/ld: cannot find -lmysql
collect2: ld returned 1 exit status
Thanks for your help
Adolfo</description> <content:encoded><![CDATA[<p>pleased</p><p> I&#8217;m compiling as follows:</p><p>gcc -o jesus $(/usr/local/src/inser_m_c/mysql/bin/mysql_config &#8211;cflags) jesus.c $(/usr/local/src/inser_m_c/mysql/bin/mysql_config &#8211;libs)</p><p>It has an error</p><p>jesus.c: In function âmainâ:<br
/> jesus.c:25: warning: passing argument 1 of âprintfâ from incompatible pointer type<br
/> jesus.c:31: warning: passing argument 1 of âprintfâ from incompatible pointer type<br
/> /usr/bin/ld: cannot find -lmysql<br
/> collect2: ld returned 1 exit status</p><p>Thanks for your help</p><p>Adolfo</p> ]]></content:encoded> </item> <item><title>By: cripton</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173411</link> <dc:creator>cripton</dc:creator> <pubDate>Fri, 19 Aug 2011 07:29:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173411</guid> <description>sorry for the spam.. I wanted to post:
#include &quot;stdlib.h&quot; in order to compile with newer compilers</description> <content:encoded><![CDATA[<p>sorry for the spam.. I wanted to post:</p><p>#include &#8220;stdlib.h&#8221; in order to compile with newer compilers</p> ]]></content:encoded> </item> <item><title>By: cripton</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173410</link> <dc:creator>cripton</dc:creator> <pubDate>Fri, 19 Aug 2011 07:26:22 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173410</guid> <description>#include &quot;stdlib.h&quot;</description> <content:encoded><![CDATA[<p>#include &#8220;stdlib.h&#8221;</p> ]]></content:encoded> </item> <item><title>By: cripton</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173408</link> <dc:creator>cripton</dc:creator> <pubDate>Fri, 19 Aug 2011 07:24:54 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173408</guid> <description>#include  in order to compile with newer compilers</description> <content:encoded><![CDATA[<p>#include  in order to compile with newer compilers</p> ]]></content:encoded> </item> <item><title>By: sunkanna</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173361</link> <dc:creator>sunkanna</dc:creator> <pubDate>Wed, 17 Aug 2011 18:41:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-173361</guid> <description>i want source code for dis question
please send me
question is
Write a C/C++ program to add a user to MySQL. The user should be permitted to only &quot;INSERT&quot; into the given database..??</description> <content:encoded><![CDATA[<p>i want source code for dis question<br
/> please send me</p><p>question is<br
/> Write a C/C++ program to add a user to MySQL. The user should be permitted to only &#8220;INSERT&#8221; into the given database..??</p> ]]></content:encoded> </item> <item><title>By: prathap</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172982</link> <dc:creator>prathap</dc:creator> <pubDate>Tue, 02 Aug 2011 09:19:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172982</guid> <description>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL  please answer this question please</description> <content:encoded><![CDATA[<p>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL  please answer this question please</p> ]]></content:encoded> </item> <item><title>By: prathap</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172949</link> <dc:creator>prathap</dc:creator> <pubDate>Mon, 01 Aug 2011 16:12:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172949</guid> <description>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.  i need this question answer as soon as possible please any one tel me....</description> <content:encoded><![CDATA[<p>Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.  i need this question answer as soon as possible please any one tel me&#8230;.</p> ]]></content:encoded> </item> <item><title>By: Anusha Rao</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172917</link> <dc:creator>Anusha Rao</dc:creator> <pubDate>Sun, 31 Jul 2011 15:19:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172917</guid> <description>Hello frd plz give me this program code
&quot; Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.&quot;</description> <content:encoded><![CDATA[<p>Hello frd plz give me this program code<br
/> &#8221; Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.&#8221;</p> ]]></content:encoded> </item> <item><title>By: Hrehan</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172884</link> <dc:creator>Hrehan</dc:creator> <pubDate>Sat, 30 Jul 2011 10:40:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172884</guid> <description>A C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
Can anyone help me with this program,i have tried it but its showing lots of error msgs..</description> <content:encoded><![CDATA[<p>A C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.</p><p>Can anyone help me with this program,i have tried it but its showing lots of error msgs..</p> ]]></content:encoded> </item> <item><title>By: Etay</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172641</link> <dc:creator>Etay</dc:creator> <pubDate>Thu, 21 Jul 2011 19:41:55 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172641</guid> <description>From my previous post, the include file is stdlib.h...</description> <content:encoded><![CDATA[<p>From my previous post, the include file is stdlib.h&#8230;</p> ]]></content:encoded> </item> <item><title>By: Etay</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172628</link> <dc:creator>Etay</dc:creator> <pubDate>Thu, 21 Jul 2011 05:37:41 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-172628</guid> <description>Might be good to add another include file #include to handle the exit(1) func properly without warnings from the compiler.
There is alway a security risk to hard code values from within your code. If you run from the shell $ strings output-file you would be able to see the user credentials along with other data. If you reverse engineer an executable, that would be pretty much step-1. A good exercise to modify the code to enter data from stdin. gets(something) or fgets(something sizeof(something), stdin)...  string.h</description> <content:encoded><![CDATA[<p>Might be good to add another include file #include to handle the exit(1) func properly without warnings from the compiler.</p><p>There is alway a security risk to hard code values from within your code. If you run from the shell $ strings output-file you would be able to see the user credentials along with other data. If you reverse engineer an executable, that would be pretty much step-1. A good exercise to modify the code to enter data from stdin. gets(something) or fgets(something sizeof(something), stdin)&#8230;  string.h</p> ]]></content:encoded> </item> <item><title>By: Kevin</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-171640</link> <dc:creator>Kevin</dc:creator> <pubDate>Mon, 30 May 2011 07:30:35 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-171640</guid> <description>Hi it works well for me.
But when i put it in my makefile.basic , it&#039;s shows me undefined error to mysql.
here is mine, pls correct me. I has been on internet for a week but still can&#039;t manage to solve it.
CC=/usr/bin/gcc
#CC=powerpc-linux-gcc
CP=/usr/bin/cp
CFLAGS=-g -Wall -L/usr/lib/mysql -lmysqlclient
www=/var/www
htdocs=/htdocs
cgi_bin=/cgi-bin
config=/etc/apache2/sites-available/default
INSTALL_DIR=$(pwd)/.install</description> <content:encoded><![CDATA[<p>Hi it works well for me.<br
/> But when i put it in my makefile.basic , it&#8217;s shows me undefined error to mysql.<br
/> here is mine, pls correct me. I has been on internet for a week but still can&#8217;t manage to solve it.</p><p>CC=/usr/bin/gcc<br
/> #CC=powerpc-linux-gcc<br
/> CP=/usr/bin/cp<br
/> CFLAGS=-g -Wall -L/usr/lib/mysql -lmysqlclient</p><p>www=/var/www<br
/> htdocs=/htdocs<br
/> cgi_bin=/cgi-bin<br
/> config=/etc/apache2/sites-available/default</p><p>INSTALL_DIR=$(pwd)/.install</p> ]]></content:encoded> </item> <item><title>By: vijaybhaskar</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170854</link> <dc:creator>vijaybhaskar</dc:creator> <pubDate>Sat, 23 Apr 2011 13:03:54 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170854</guid> <description>sorry i forgot to add error message:
gcc -o output-file $(mysql_config --cflags) test_mysql.c $(mysql_config --libs)
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status</description> <content:encoded><![CDATA[<p>sorry i forgot to add error message:<br
/> gcc -o output-file $(mysql_config &#8211;cflags) test_mysql.c $(mysql_config &#8211;libs)<br
/> /usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient<br
/> /usr/bin/ld: cannot find -lmysqlclient<br
/> collect2: ld returned 1 exit status</p> ]]></content:encoded> </item> <item><title>By: vijaybhaskar</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170853</link> <dc:creator>vijaybhaskar</dc:creator> <pubDate>Sat, 23 Apr 2011 13:00:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170853</guid> <description>when i run above program in my test machine. i am getting below errors. Could you please tel me how to rectify this.
OS: Gnu/Linux
Version:  2.6.18-194.el5
64Bit.</description> <content:encoded><![CDATA[<p>when i run above program in my test machine. i am getting below errors. Could you please tel me how to rectify this.<br
/> OS: Gnu/Linux<br
/> Version:  2.6.18-194.el5<br
/> 64Bit.</p> ]]></content:encoded> </item> <item><title>By: Niroshan</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170458</link> <dc:creator>Niroshan</dc:creator> <pubDate>Mon, 04 Apr 2011 13:24:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170458</guid> <description>ok creating a symlink to /opt/lampp/mysql/mysql.sock from /var/run/mysqld/mysqld.sock solved the problem.
Thank you for the article, it was really helpful.</description> <content:encoded><![CDATA[<p>ok creating a symlink to /opt/lampp/mysql/mysql.sock from /var/run/mysqld/mysqld.sock solved the problem.<br
/> Thank you for the article, it was really helpful.</p> ]]></content:encoded> </item> <item><title>By: Niroshan</title><link>http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170457</link> <dc:creator>Niroshan</dc:creator> <pubDate>Mon, 04 Apr 2011 11:42:56 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html#comment-170457</guid> <description>I have Lampp installed. When I run mysql_config --libs I was asked to install &#039;libmysqlclient15-dev&#039;.  When I run mysql_config command with libs and cflags after installing libmysqlclient15-dev it didn&#039;t give me the exact output as you have specified but -L/usr/lib/mysql -lmysqlclient  and -I/usr/include/mysql was there respectively.
Program compilation was done successfully with few warnings but when I run it, gave me following error.
Can&#039;t connect to local MySQL server through socket &#039;/var/run/mysqld/mysqld.sock&#039; (2)
what might be the problem?</description> <content:encoded><![CDATA[<p>I have Lampp installed. When I run mysql_config &#8211;libs I was asked to install &#8216;libmysqlclient15-dev&#8217;.  When I run mysql_config command with libs and cflags after installing libmysqlclient15-dev it didn&#8217;t give me the exact output as you have specified but -L/usr/lib/mysql -lmysqlclient  and -I/usr/include/mysql was there respectively.<br
/> Program compilation was done successfully with few warnings but when I run it, gave me following error.<br
/> Can&#8217;t connect to local MySQL server through socket &#8216;/var/run/mysqld/mysqld.sock&#8217; (2)<br
/> what might be the problem?</p> ]]></content:encoded> </item> </channel> </rss>
