InnoDB inside a file does not work either, but MyISAM does
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.
Subject
Views
Written By
Posted
3532
October 15, 2013 08:35AM
2279
October 15, 2013 11:55AM
InnoDB inside a file does not work either, but MyISAM does
1245
October 16, 2013 06:46AM
1267
October 30, 2013 05:58AM
1879
October 30, 2013 11:08AM
975
November 06, 2013 08:09PM
1186
November 13, 2013 02: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.