Hi,

I am starting mysql embedded server with c++ using the following code:

Code:
static char *server_options[] = \
        { (char *)"mysql_test",
		  (char *)"--datadir=C:/ILRI/",		  
		  (char *)"--innodb=OFF",		 
          (char *)"--default-storage-engine=MyISAM",
          (char *)"--skip-grant-tables=1",
          (char *)"--myisam-recover=FORCE",
          (char *)"--key_buffer_size=256217728", //16777216 //
          (char *)"--character-set-server=utf8",
          (char *)"--collation-server=utf8_bin",
          NULL };

        int num_elements = (sizeof(server_options) / sizeof(char *)) - 1;

        qDebug() << "Elems: " << num_elements;

		qDebug() << "mysql_library_init";
        mysql_library_init(num_elements, server_options, NULL);
        qDebug() << "mysql_init";
		m_mysql = mysql_init(NULL);

        int valopt;
        valopt = 1;
		qDebug() << "mysql_options";
        if (mysql_options(m_mysql,MYSQL_OPT_LOCAL_INFILE,(void *)&valopt))
            qDebug() << "Error setting option";

		qDebug() << "mysql_real_connect";
        mysql_real_connect(m_mysql, NULL,NULL,NULL, "database1", 0,NULL,0);
The same code works fine in Linux (replacing --datadir with an existing path), but in Windows the embedded server creates an .err file with the following content:

Code:
mysql_embedded: Unknown error 1146
120412 12:54:45 InnoDB: The InnoDB memory heap is disabled
120412 12:54:45 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120412 12:54:45 InnoDB: Compressed tables use zlib 1.2.3
120412 12:54:46 InnoDB: Initializing buffer pool, size = 128.0M
120412 12:54:46 InnoDB: Completed initialization of buffer pool
120412 12:54:46  InnoDB: Operating system error number 3 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: File name C:\ILRI\GOBLET\tools\goblet-createdb\data\ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.
As you can see in the server options I have --innodb=OFF so I don't know why I get the InnoDB errors.

mysql_library_init is the one creating the error file. And the program exist.

I am using libmysqld.dll (5.5.22.0)

Any idea what needs to be done in Windows to start the embedded server?

Thanks, Carlos.