zsh-users
 help / color / mirror / code / Atom feed
* Using libmysqlclient from module
@ 2005-06-07 23:03 Mariusz Gniazdowski
  2005-06-08 20:21 ` Mariusz Gniazdowski
  0 siblings, 1 reply; 2+ messages in thread
From: Mariusz Gniazdowski @ 2005-06-07 23:03 UTC (permalink / raw)
  To: zsh-users

Hi.
I wrote module that is linked to libmysqlclient and tries to open
connection. The code:

static MYSQL db;

/**/
static int
sql_connect(char *nam, char **args, Options ops, UNUSED(int func))
{
	if(!mysql_connect(&db, "localhost", "username", "password")){
		printf("Connection failed: %s\n",mysql_error(&db));
		return 1;
	}
	printf("Connected\n");
	return 0;
}

Following error occurs when running this builtin:

$ sql_connect
Connection failed: Lost connection to MySQL server during query

-- 
Regards
Mariusz Gniazdowski

----------------------------------------------------------------------
Startuj z INTERIA.PL! >>> http://link.interia.pl/f186c 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-08 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-07 23:03 Using libmysqlclient from module Mariusz Gniazdowski
2005-06-08 20:21 ` Mariusz Gniazdowski

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).