dbTalk Databases Forums  

MySQL 5.1 -- how to move InnoDB tables to another location?

comp.databases.mysql comp.databases.mysql


Discuss MySQL 5.1 -- how to move InnoDB tables to another location? in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ignoramus3188
 
Posts: n/a

Default MySQL 5.1 -- how to move InnoDB tables to another location? - 01-22-2011 , 01:03 PM






I used to move my databases that were based on MyISAM, by simply
moving the directory to where I wanted it to be, and then creating a
symlink from /var/lib/mysql to the new location.

I am working in creating a appx. 40 GB database and decided to use
InnoDB, to avoid the horrors of repairing tables.

When I looked into /var/lib/mysql/mynewproject, to my surprise I found
that the files are empty and, seemingly, innodb files were right under
/var/lib/mysql.

-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:22 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:20 ib_logfile1
-rw-rw---- 1 mysql mysql 329252864 Jan 22 02:22 ibdata1

My root partition is not big enough to hold all that stuff.

So, how would I create or move them elsewhere?

It would seem that some options are available under my.cnf, but I
would really like to be able to specify that per-database, is that
possible?

Thanks

i

Reply With Quote
  #2  
Old   
Luuk
 
Posts: n/a

Default Re: MySQL 5.1 -- how to move InnoDB tables to another location? - 01-22-2011 , 01:53 PM






On 22-01-11 20:03, Ignoramus3188 wrote:
Quote:
I used to move my databases that were based on MyISAM, by simply
moving the directory to where I wanted it to be, and then creating a
symlink from /var/lib/mysql to the new location.

I am working in creating a appx. 40 GB database and decided to use
InnoDB, to avoid the horrors of repairing tables.

When I looked into /var/lib/mysql/mynewproject, to my surprise I found
that the files are empty and, seemingly, innodb files were right under
/var/lib/mysql.

-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:22 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:20 ib_logfile1
-rw-rw---- 1 mysql mysql 329252864 Jan 22 02:22 ibdata1

My root partition is not big enough to hold all that stuff.

So, how would I create or move them elsewhere?

It would seem that some options are available under my.cnf, but I
would really like to be able to specify that per-database, is that
possible?

Thanks

i

googling for: "location of innodb"

second link:
http://dev.mysql.com/doc/refman/5.0/...iguration.html

--
Luuk

Reply With Quote
  #3  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: MySQL 5.1 -- how to move InnoDB tables to another location? - 01-22-2011 , 06:14 PM



Ignoramus3188 <ignoramus3188 (AT) NOSPAM (DOT) 3188.invalid> wrote:
Quote:
I used to move my databases that were based on MyISAM, by simply
moving the directory to where I wanted it to be, and then creating a
symlink from /var/lib/mysql to the new location.

I am working in creating a appx. 40 GB database and decided to use
InnoDB, to avoid the horrors of repairing tables.
Unfortunately you didn't decide to RTFM too ...

Quote:
When I looked into /var/lib/mysql/mynewproject, to my surprise I found
that the files are empty and, seemingly, innodb files were right under
/var/lib/mysql.

-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:22 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:20 ib_logfile1
-rw-rw---- 1 mysql mysql 329252864 Jan 22 02:22 ibdata1
Yeah. Just as configured (by defaults).

Quote:
My root partition is not big enough to hold all that stuff.
So, how would I create or move them elsewhere?
RTFM

--innodb-file-per-table


XL

Reply With Quote
  #4  
Old   
Ignoramus3188
 
Posts: n/a

Default Re: MySQL 5.1 -- how to move InnoDB tables to another location? - 01-22-2011 , 09:27 PM



On 2011-01-23, Axel Schwenke <axel.schwenke (AT) gmx (DOT) de> wrote:
Quote:
Ignoramus3188 <ignoramus3188 (AT) NOSPAM (DOT) 3188.invalid> wrote:
I used to move my databases that were based on MyISAM, by simply
moving the directory to where I wanted it to be, and then creating a
symlink from /var/lib/mysql to the new location.

I am working in creating a appx. 40 GB database and decided to use
InnoDB, to avoid the horrors of repairing tables.

Unfortunately you didn't decide to RTFM too ...

When I looked into /var/lib/mysql/mynewproject, to my surprise I found
that the files are empty and, seemingly, innodb files were right under
/var/lib/mysql.

-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:22 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 Jan 22 02:20 ib_logfile1
-rw-rw---- 1 mysql mysql 329252864 Jan 22 02:22 ibdata1

Yeah. Just as configured (by defaults).

My root partition is not big enough to hold all that stuff.
So, how would I create or move them elsewhere?

RTFM

--innodb-file-per-table


XL
Thanks, guys. I am pulling all my remaining hair out right now, for not
reading the FM. Sorry about that.

Also, I have decided to move this database to a server that has a huge
root partition, so this is not an issue. That server is colocated at a
real ISP, and will be better suited to hold a large database. I have
another large database project planned too, and they will live just
fine there.

How is InnoDB working on 5.1? Any major bugs?

i

Reply With Quote
  #5  
Old   
Axel Schwenke
 
Posts: n/a

Default Re: MySQL 5.1 -- how to move InnoDB tables to another location? - 01-23-2011 , 10:25 AM



Ignoramus3188 <ignoramus3188 (AT) NOSPAM (DOT) 3188.invalid> wrote:
Quote:
How is InnoDB working on 5.1? Any major bugs?
In 5.1 there are two InnoDB implementations: by default the builtin
InnoDB is used. But there is also the InnoDB plugin with additional
features (page compression, online add-index, better diagnostics)
and slightly better performance.

I suggest to go for 5.5 immediately. There the builtin InnoDB has
been replaced with the plugin implementation already.


XL

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.