Can MySQL have one file per database?

ms-access, mysql

Solution

Short answer: no.

Long answer: it depends on the storage engine.

All dbs managed by innodb storage engine are stored in one file. If you have 3 innodb dbs on the server, they all are going to be stored in one file. This can be changed however with innodb_file_per_table

MYISAM storage engine stores each table of the db in two separate files: data and index.

Why do you need a single file anyway? MySQL has a built-in replication mechanism, you shouldn't worry about that.

Problem

I like the fact that a Microsoft Access `.mdb` file contains a complete database in a single file, so for example `foo.mdb` may contain all the data, table structures and queries for one database. I want to move over to MySQL. I understand that MySQL can use many file structures. Can MySQL replicate the single file model of one database = one file?

Original source