All configurations mentioned in this article are excerpted from the *MySQL 5 Authority Guide (3rd Edition)*. Personally, I believe they are very useful for using MySQL. They are placed here for my own reference at any time, and I hope they will also be helpful to other friends. (Last updated on May 30, 2007)
**mysqld Program - Directories and Files:**
- **basedir = path**: Use the specified directory as the root directory (installation directory).
- **character-sets-dir = path**: Specify the directory where character sets are stored.
- **datadir = path**: Read database files from the specified directory.
- **pid-file = filename**: Specify a file for the mysqld program to store its process ID (only applicable to UNIX/Linux systems). The Init-V script needs to use the process ID in this file to terminate the mysqld process.
- **socket = filename**: Specify a socket file for local communication between MySQL client programs and the server (only applicable to UNIX/Linux systems; the default setting is generally the /var/lib/mysql/mysql.sock file).