Specifying the Location of the Data Directory for the Database

From SmartWiki
Jump to: navigation, search


Ambox warning pn.png This article is deprecated and the information contained within may no longer be correct.

You can store the database and related files in any folder on any computer accessible to the computer running the database server.

Use the following step to move the database files and reconfigure the database configuration file:

Microsoft Windows

1. Stop the server process.

2. Locate the options file: MY.INI. In a Windows based computer this file is stored in the Windows folder.

3. Edit this file and change the datadir parameter to the new location for example "datadir=F:/mydata"

4. Save the file

5. Copy all the files to the new location.

6. Restart the Server.

Linux

Location of ini file - /etc/my.cnf