Sample Header Ad - 728x90

is it safe to create mysql database by just creating its directory?

0 votes
1 answer
483 views
**context**: I want a separate encrypted filesystem per database (to have a separate key) on MySQL 5.7 but if I mount it before I execute CREATE DATABASE foo it fails with error database exists, and mouting the filesystem after is a bit risky to me. So I noticed I can "create" a database in MySQL but just creating a folder inside the mysql datadir and creating tables after causes no trouble. I know this is dirty but this way it simplifies the integration with the creation of the filesystem underneath (as it appeared as the folder when lie the tables). Does creating database this way is safe?
Asked by Baptiste Mille-Mathias (130 rep)
Apr 20, 2021, 08:22 AM
Last activity: Jan 6, 2025, 06:03 AM