From: Mariusz Gniazdowski <cellsan@interia.pl>
To: zsh-users@sunsite.dk
Subject: Using libmysqlclient from module
Date: Wed, 8 Jun 2005 01:03:22 +0200 [thread overview]
Message-ID: <20050607230322.GA2419@mordor.lan> (raw)
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
next reply other threads:[~2005-06-07 23:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-07 23:03 Mariusz Gniazdowski [this message]
2005-06-08 20:21 ` Mariusz Gniazdowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050607230322.GA2419@mordor.lan \
--to=cellsan@interia.pl \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).