Hello.

I'm just getting started with the embedded mysql
server and I'm not trying to do anything fancy.  I
just want to initialize the server and call
"mysql_create_db" and have the database get created
and then start using it.

I've modified the basic "embedded server" example as
follows:

  mysql_server_init(sizeof(server_args) / sizeof(char
*), server_args, server_groups);

  if(mysql_create_db(&one, "my_database")) {
        fprintf(stderr, "Failed to create new
database.  Error: %s\n", mysql_error(&one));
  }
  one = db_connect("my_database");
  two = db_connect(NULL);

  db_do_query(one, "SHOW TABLE STATUS");
  db_do_query(two, "SHOW DATABASES");

  mysql_close(two);
  mysql_close(one);


I get a "test_mysqld.c:53: warning: implicit
declaration of function `mysql_create_db'" when
compiling and then I get a Seg Fault when it is ran.

What am I doing wrong?

- Steve

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to