Bono, Saroj AA R62 wrote:
>
>When I created a database (directly in mysql) from some random dir where
>I started mysql, I found that it got created in the /var/lib/mysql dir.
>I ran mysql from a dir where my C++ program is. I wanted to create a
>database using mysql_query so I did mysql_query( &mysql, "CREATE
>DATABASE IF NOT EXISTS abc"). THis didnt create anything. If it did
>would it be created in the /var/lib location ?I want to create it in my
>local dir (when I do get my syntax to work!). How do I tell mysql to
>make the database in some specific location?
>Thanks.
>
>
>
You don't. All mysql databases for a specific server must appear in its
database directory.
You can, however stop the server, move the database and create a
symbolic link in /var/lib/mysql
that points to it.
Why do you want to do this? It sounds like a potential administration
nightmare.