--Next_1157605463---0-203.199.83.125-21268
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hi all,=0A=0AI have problem connecting to InnoDB database when using embedd=
ed MySQL.=0ATest program is unable to open 'mysql' database. I am getting f=
ollowing messages:=0A=0AAble to initialise server=0AUnknown database 'mysql=
'=0Amysql_real_connect() failed=0A=0ATest program source and envrionmental =
details are given below.=0A=0AEnvironment details are:=0A=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0AUsing mysql-4.1.21-wi=
n32, MS VC++ 6.0=0A=0A* libmysqld.lib and libmysqld.dll are picked up from =
mysql-4.1.21-win32\Embedded\DLL\Release=0A* Database files (ibdata1, ib_log=
file0, ib_logfile1) are created with MySQL-4.1.21 Client/Server installed o=
n other computer and it consists of default databases "mysql" and "test" cr=
eated during MySQL-installation. I copied them in D:\MySQL.=0A* MySQL clien=
t/server instance is not running.=0A=0Amy.ini is available in C:\ directory=
and its contents are=0A=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A[client]=0A= 0Aport=3D3306=
=0Adefault-character-set=3Dutf8=0A=0A[Mysqltst_SERVER]=0A=0A port=3D3306=0Ab=
asedir=3D"C:/Program Files/MySQL/MySQL Server 4.1/"=0Adefault-character-set=
=3Dutf8=0Alanguage=3D"C:/Program Files/MySQL/MySQL Server 4.1/Share/English=
"=0Adefault-storage-engine=3DINNODB=0Adatadir=3D"D:/MySQL/"= 0Ainnodb_log_fi=
le_size=3D10M=0A=0ASource code of test program:=0A=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A =0A#include <wi=
ndows.h>=0A#include <winsock.h>=0A#include <mysql.h>=0A=0A#include <stdio.h=
>=0A#include <stdlib.h>=0A=0Astatic char *server_args[] =3D {=0A"Mysqltst",=
/* this string is not used */=0A"--datadir=3DD:\\MySQL",=0A"--key_buffer_s=
ize=3D32M"=0A};=0A=0Astatic char *server_groups[] =3D {=0A"embedded",=0A"se=
rver",=0A"Mysqltst_SERVER",=0A(char *)NULL=0A};=0A=0Aint main(void)=0A{=0AM=
YSQL *mysql ;=0A=0Aif (mysql_server_init(sizeof(server_args) / sizeof(char =
*),=0Aserver_args, server_groups))=0Aexit(1);=0A=0Amysql =3D mysql_init(NUL=
L) ;=0Aprintf("Able to initialise server\n") ;=0A=0A/* Use any MySQL API fu=
nctions here */=0A=0Amysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "Mysqlt=
st_SERVER") ;=0Amysql_options(mysql, MYSQL_OPT_USE_EMBEDDED_CONNECTION, 0);=
=0A=0Aif(mysql_real_connect(mysql, NULL, NULL, NULL, <<<--- This is failing=
=0A"mysql", 0, NULL, 0) =3D=3D NULL)=0A{=0Aprintf(mysql_error(mysql)) ;=0Ap=
rintf("\nmysql_real_connect() failed\n") ;=0Amysql_close(mysql) ;=0Aexit(1)=
;=0A}=0A=0Amysql_server_end();=0A=0Aprintf("Able to end server\n") ;=0A=0A=
return EXIT_SUCCESS;=0A}=0A=0A=0A- - - - - - - - -=0A=0AWarning in Error lo=
g file:=0A=0A060906 11:58:23 [Warning] Can't open and lock time zone table:=
Table 'mysql.time_zone_leap_second' doesn't exist trying to=0A=0Alive with=
out them=0A=0AIt seems this warning is again due to the fact that test prog=
ram is unable to open mysql database.=0A- - - - - - - - -=0A=0ABuild Log - =
If some one may find it useful.=0A=0A--------------------Configuration: tes=
tcom - Win32 Release--------------------=0ACommand Lines=0ACreating tempora=
ry file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPE4.tmp" with contents=0A[=0A=
/nologo /MT /W3 /GX /O2 /I "C:\Program files\MySQL\MySQL Server 4.1\Include=
" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS"=0A=0A/Fp"Release/Mysqlcon=
..pch" /YX /Fo"Release/" /Fd"Release/" /FD /c=0A"C:\User\VC\Abhay\TestProjec=
ts\MySQLTst\File-1.c"=0A]=0ACreating command line "cl.exe [at] C:\DOCUME~1\ADMI=
NI~1\LOCALS~1\Temp\RSPE4.tmp"=0ACreating temporary file "C:\DOCUME~1\ADMINI=
~1\LOCALS~1\Temp\RSPE5.tmp" with contents=0A[=0Akernel32.lib user32.lib gdi=
32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut3=
2.lib uuid.lib=0A=0Aodbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.l=
ib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib=0A=0Aoleaut=
32.lib uuid.lib odbc32.lib odbccp32.lib libmysqld.lib /nologo /subsystem:co=
nsole /incremental:no=0A=0A/pdb:"Release/Mysqlcon.pdb" /machine:I386 /out:"=
Mysqlcon.exe" /libpath:"C:\Program Files\MySQL\MySQL Server 4.1\lib"=0A".\R=
elease\File-1.obj"=0A]=0ACreating command line "link.exe [at] C:\DOCUME~1\ADMIN=
I~1\LOCALS~1\Temp\RSPE5.tmp"=0AOutput Window=0ACompiling...=0AFile-1.c=0ALi=
nking...=0A=0AResults=0AMysqlcon.exe - 0 error(s), 0 warning(s)=0A- - - - -=
- - - -=0A=0ACan anyone suggest the possible cause of the problem?=0A=0ATh=
anks in advance,=0AAkhil=0A=0A
--Next_1157605463---0-203.199.83.125-21268--
