Click here to get back home

Create new db in a specified folder

 HomeNewsGroups | Search | About
 mailing.database.mysql    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Create new db in a specified folder JirkaJ 03-22-2006
Get Chitika Premium
Posted by JirkaJ on March 22, 2006, 8:49 am
Please log in for more thread options
Hello,
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?
thanks
j.


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.



Similar ThreadsPosted
Create new db in a specified folder March 22, 2006, 8:49 am
Why Should I Create A Foreign Key? November 2, 2005, 2:45 pm
can't create new user in 4.1.18 February 22, 2006, 12:46 pm
Create database using variable name September 13, 2005, 8:59 am
Can NOT Create or Drop a Database :o( September 16, 2005, 10:04 am
Fastest Way to Create a Replica January 19, 2006, 12:47 am
Error in CREATE TABLE March 17, 2006, 10:28 am
create database privileges May 26, 2006, 4:46 am
Create General query log June 1, 2006, 8:32 pm
LEFT JOIN? Or create another table? September 27, 2005, 10:13 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap