I'm trying to make work a C MySQL client on a Unix server/client
environment through terminal.
I have restricted access(username/password) to a specific database to which I
connect with no problem using the 'mysql' cmdline tool.
I write a simple C program ( connect/disconnect )
int main( int argc, char *argv )
printf( "just checking..." );
db = mysql_init( NULL );
if( mysql_real_connect( db, server, NULL, NULL, NULL, 0, NULL, 0 ) )
fprintf( stderr, mysql_error( db ) );
printf( "%d\n", mysql_ping( db ) );
mysql_close( db );
I manage to successfully build and link it with gcc
but when i execute the produced binary it gives no
output, not even the "just checking" printf() message.
i've posted the same question on the MySQL forum,
but no luck.
any suggestion would be greatly appreciated,