MySQL Forums
Forum List  »  InnoDB

Create new innodb database at another disk
Posted by: Kyrre Traavik Laaberg
Date: March 16, 2009 09:38AM

I need help creating a new innodb database at another disk than the one mysql was installed on.

I currently have MySQL 5.1.30 installed on the C drive on a widows machine (Vista)
with one large tablespace file (ibdata1). The working directory (C:\mysql\data\) has only one database (in addition to the standard mysql-folder) and looks like this:

words (folder - my database)
ib_logfile0 (file, ~1MB)
ib_logfile1 (file ~1MB)
ibdata1 (file, ~120 GB)

The folder (and database) 'words' contains these files:

db.opt
sentences.frm
ngram-one.frm
ngram-two.frm
ngram-three.frm
ngram-four.frm

The table 'sentences' are norwegian sentences collected from the web and the others are tables containing split sentences of one, two, three, four ngrams.

Now I want to move the tables 'sentences' to my D drive (D:\mysql\data\) to relieve the strain on my C drive. I did an experiment with symlink to test, but I realized that the actual data was still being written to c: to ibdata1, which does little to relieve the strain on C.

My question is simply, how can I create a database on D:\ (for example words2) that has its own ibdata2 that it writes to? If I can get advice on this, I can easily write a php script to move the actual data from C to D later.

This is the result I'm looking for:

C:\mysql\data\

words
...
ibdata1

D:\mysql\data\
words2
...
ibdata2

Can this be done and how? I am specifically looking for syntax on creating a database on D:\ as I have not been able to find it on the web

Any help greatly appreciated!
Kyrre

Options: ReplyQuote


Subject
Views
Written By
Posted
Create new innodb database at another disk
6926
March 16, 2009 09:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.