New Page  |  Edit Page


MySQL Data Files

The installation directory contains database metadata and data files. That is the database schema and corresponding values. Files that appear will vary by datase engine, platform, etc.

MySQL Directory Files Location The data folder path is set in the MySQL configuration file MySQL configuration file in Windows is my.ini and Linux is my.cnf Windows: C:\Program Files\MySQL\MySQL Server 5.2\my.ini Open my.ini and search for the word “basedir” basedir – gives the location of MySQL installation datadir – gives the location of MySQL data directory #Path to installation directory basedir="C:/Program Files/MySQL/MySQL Server 5.2/" #Path to the database root datadir="C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.2/Data/" In that path, there is a separate folder for each database with the name of the database itself. Database files can be used for backup to secure data, schema, and indices in general circumstances, migration and DB upgrades.