![]() ![]() You can specify an option at server startup time, either on the command line or in an option file. There are two ways to relocate the data directory or elements within it: The rest of this section discusses which parts of the data directory can be moved and how you go about making such changes. That means you'd need to run the server as root, which for security reasons is not a good idea.) (However, many systems allow only root to write to these directories. In similar fashion, if your system uses /var/log for log files, you can also put the MySQL logs there. You might want to put the MySQL PID file there, too, for consistency of system operation. Some systems keep server PID files in a specific directory, such as /var/run. This is one way to work around problems with per-process file descriptor limits, especially if you cannot reconfigure the kernel for your system to allow higher limits. You might want to run multiple servers, each with its own data directory. Putting databases and logs on different disks helps minimize the damage that can be caused by a failure of a single disk. Similarly, the InnoDB tablespace is conceptually a single large block of storage, but you can put its individual component files on different drives to improve performance. You can put databases and log files on different drives or distribute databases across drives for the same reasons. ![]() ![]() If your data directory is on a busy disk, you can put it on a less active drive to balance disk activity across physical devices. You can put the data directory on a file system that has a capacity greater than the file system where it's located by default. There are several reasons why you might want to do this: MySQL allows you to relocate the data directory itself or certain elements within it. However, you have some latitude in determining the placement of the data directory's contents. The preceding part of this chapter discusses the data directory structure in its default configuration, which is that all databases, status, and log files are located within it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |