MySQL Forums
Forum List  »  InnoDB

InnoDB inside a file does not work either, but MyISAM does
Posted by: Robert Klebe
Date: October 16, 2013 06:46AM

Update to the matter.

You do actually not a NTFS partition at all, just a filesystem inside a file.

I tried the following:

service mysql stop
mkdir -p /var/public
mkdir -p /var/public/file_mount
dd if=/dev/zero of=/var/public/file count=40 bs=1M
# reason for 40 is that my current innodb + myisam data was 29 + 2 MB.
mke2fs /var/public/file
chmod 777 -R /var/public
mount /var/public/file /var/public/file_mount -o loop
cp -R /var/lib/mysql/* /var/public/file_mount
umount /var/public/file_mount

In /etc/fstab I added this to both mount file and then make it mysql owner/group:
/var/public/file /var/public/file_mount ext4 loop 0 0
bindfs#/var/public/file_mount /var/lib/mysql fuse owner=mysql,group=mysql,perms=755 0 0

Checked that it worked: mount -a
It did - /var/lib/mysql was now "physically" stored inside /var/public/file

Note that /var/public is on the root filesystem, a regular ext4, no NTFS today.

Tried to start mysql: service mysql start
Also worked, but produced same error in log as for NTFS on boot and recreated ibdata files.

Rebooted, checked log again - same error as for NTFS, data being overwritten every reboot. MyISAM seems to work. If you want your db in a file like SQLite, do MyISAM.



Edited 2 time(s). Last edit at 10/16/2013 06:50AM by Robert Klebe.

Options: ReplyQuote


Subject
Views
Written By
Posted
InnoDB inside a file does not work either, but MyISAM does
1153
October 16, 2013 06:46AM


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.