MySQL Directory Structure


We will assume in this discussion that you have installed MySQL in the default location on your operating system. If you have installed it elsewhere, the basic directory structure will still be the same, but the base locations will be different.

If your system came with a vendor-supplied version of MySQL, you may have a different structure. For example, if you have Red Hat 9, you will find that it has reorganized the files to fit into its overall filing system. If you have installed MySQL from a MySQL-supplied RPM, the files should be in the locations documented here.

You should also note that the directory structure will vary slightly depending on which optional items you installed and whether you installed a binary distribution or a source distribution. In this book, we assume that you installed a binary distribution as recommended in Chapter 1, "Installing MySQL."

If you have a Unix-like operating system, the default location for the MySQL files is in /usr/local/mysql. If you have Windows, the default location is C:\mysql.

At that location, you will find a set of directories, including the following ( assuming that you installed from a binary distribution):

  • bin: This directory contains the MySQL server and client programs and several other useful compiled programs. The contents of this directory are covered in the next section of this chapter.

  • scripts: This directory contains a set of Perl scripts that perform useful tasks . We will look at these in the next section of this chapter.

  • data: This is where your actual database data resides.

  • docs (Linux) or Docs (Windows): You will find the MySQL documentation in this directory, in HTML format.

  • sql-bench (Linux) or bench (Windows): This directory contains a benchmarking suite.

There are also a couple of other directories that the average user will rarely go into: include (containing header files), lib (containing libraries used by MySQL), share (containing MySQL's error messages), and examples (only in Windows, containing examples of using the libmysql DLL). You may need to know where these directories are if you install other software (such as PHP) that links to MySQL, but you are unlikely to interact with them directly.



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net