Hello,

I'm quite new to mysql so I apologize if my question seems stupid. I hope it 
is the right mailing list for that question. 

I'm using the mysql embedded library (libmysqld) with a small c++ program. 
This program created a new database in its directory and I would like to use 
this database like any other normal database. 

I found a complicated way to do this by copying the /var/lib/mysql/mysql 
directory and files to my program's directory, changing owner and group to 
'mysql' and then runnig mysqld with "--datadir=."
It seems to work fine except for this message:
--------
mysql> use dbtest;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>
---------

As you can see it is quite complicated. When I need to run my program, I have 
to change the owner and group for the database again. 

I tried  at least to make mysqld use the database without changing its owner 
like this: 

----
mysqld --user adrien --datadir=.  &
[1] 6633
[EMAIL PROTECTED]:/home/adrien/c++/mysqltest# Warning: Ignoring user change to 
'adrien' because the user was set to 'mysql' earlier on the command line
mysqld: ready for connections.
Version: '4.0.20-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 0
---
but I cannot use the database:
-----
mysql> use ;
Can't read dir of './dbtest/' (Errcode: 13)
Database changed
mysql> show tables;
ERROR 12: Can't read dir of './dbtest/' (Errcode: 13)
mysql>
-----


Could somebody tell me a better way to use the local database "dbtest" ?

Thanks.
Adrien



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to