|
Posted by Bill Karwin on March 22, 2006, 9:55 am
Please log in for more thread options
> is it possible(and how?) to make a new database in a specified folder -
> i.e. /home/me/mysqldb? or how may i install mysql on debian to use this
> folder for data files?
All MySQL databases are created relative to the datadir.
You may be able to fool MySQL by using a symbolic link. The link exists
under the MySQL datadir, and points to the physical directory
/home/me/mysqldb/.
See http://dev.mysql.com/doc/refman/5.0/en/symbolic-links-to-databases.html
Note that this works for MyISAM tables, but not necessarily for InnoDB. By
default, all InnoDB data and indexes for all databases in a single file:
<datadir>/ibdata1. If you use the InnoDB per-table tablespaces, you may be
able to achieve something similar. See
http://dev.mysql.com/doc/refman/5.0/en/multiple-tablespaces.html if you need
to do this.
Regards,
Bill K.
|