LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-25-2008, 11:33 AM   #1
timnp
Member
 
Registered: Feb 2008
Location: London
Distribution: FC8, FC9, Centos 4, Centos 5, Knoppix
Posts: 52

Rep: Reputation: 16
MySQL database filestorage location (how to change?)


Hi.

I have several databases on my MySQL server, some of them are getting pretty large and I want to start storing them in separate locations. I have found that you can edit the config files to change where ALL of the database files are stored and then just move the database files to the new location, however, I want to store the databases in different places, some on different drives/partitions etc, is there a way of specifying the file location on a per database basis?

Thanks in advance,

Tim
 
Old 02-25-2008, 11:56 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,159

Rep: Reputation: 258Reputation: 258Reputation: 258
Hi

Not sure if it's possible by configuration per database, but symlinking works. You can symlink both directories (databases) or files (tables). This is often used to spead up things - I think people usually move to have index files on data on different disks.

http://dev.mysql.com/doc/refman/5.1/...lic-links.html
 
Old 02-26-2008, 04:36 AM   #3
timnp
Member
 
Registered: Feb 2008
Location: London
Distribution: FC8, FC9, Centos 4, Centos 5, Knoppix
Posts: 52

Original Poster
Rep: Reputation: 16
Yes a symlink that sounds like the solution. The thought hadn't even crossed my mind, it's nice where there is a simple solution.

Cheers
 
Old 02-29-2008, 06:55 AM   #4
timnp
Member
 
Registered: Feb 2008
Location: London
Distribution: FC8, FC9, Centos 4, Centos 5, Knoppix
Posts: 52

Original Poster
Rep: Reputation: 16
Ok, so if I get some more disks / one nice big disk to store the MySQL database/tables on what disk format would be best for the partition?

The database in question is quite large, it has lots of writes but these are mainly delayed inserts and no one is going to shed any tears if they take a little while to happen. It would be good if reads could be as fast as possible, the cache hit rate isn't terribly high due to the randomness of the requests.

Nothing is wrong with the MySQL setup as such, I was just wondering if there was any way of improving the speed by using an efficient filesystem format. I use ext3 on all the other drives and the MySQL (/var/wherever it is), at the moment. Would ext3 be ok for a dedicated MySQL partition or would something simpler improve performance?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i change my Database server name from localhost to mysql? alxbob Linux - Server 1 10-19-2007 03:06 AM
location of tables in mysql database in linux Buddhike G Linux - Software 1 09-10-2007 06:27 AM
how to change the location of mysql lexthoonen Linux - Newbie 4 01-25-2007 01:02 PM
MySQL won't change database directory techker Linux - Software 2 10-04-2006 02:11 PM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 03:43 PM


All times are GMT -5. The time now is 07:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration