Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Sooner or later, the question of where to place files will come up. MySQL creates a variety of files:
Data and index files
Transaction log files
Binary log files
General log files (e.g., for the error log, query log, and slow query log)
Temporary files and tables
MySQL doesn’t have many features for complex tablespace management. By default, it simply places all files for each database (schema) into a single directory. You have a few options to control where the data goes. For example, you can specify an index location for MyISAM tables, and you can use MySQL 5.1’s partitioned tables.
If you’re using InnoDB’s default configuration, all data and indexes go in a single set of files, and only the table definition files are placed in the database directory. As a result, most people place all data and indexes on a single volume.