[ACCEPTED]-Change database files location in MySQL administrator?-mysql

Accepted answer
Score: 21

Normally it works like this:

  1. shut down MySQL
  2. change the [mysqld] and [mysqld_safe] datadir variable in the MySQL configuration
  3. change the basedir variable in the same section.
  4. move the location over
  5. restart MySQL

If that doesn't 5 work I have no idea. On linux you can try 4 to move the socket to a new location too, but 3 that shouldn't affect windows. Alternatively 2 you can use a symbolic link on *nix what 1 most people do I guess.

Score: 9

In Windows

  1. Navigate to C:\Program Files\MySQL\MySQL Server 5.4\ and locate the my.ini file
  2. Find the SERVER SECTION and go to approx line 76 and modify the datadir line to where you want your MySQL application data to be stored
  3. Now navigate to C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.4\data\ and copy and paste the mysql folder into your new location.
  4. Restart the MySQL Server in Control Panel > Administrative Tools > Service

0

Score: 0

You also have to manually modify mysql's 1 configuration (usually my.conf)

Score: 0

MySQL Administrator cannot be used for tasks 9 like this. It is merely a tool for looking 8 at MySQL servers, despite its name. Relocating 7 data is described in many MySQL tutorials 6 and in the manual IIRC. But basically it's 5 just moving the data to a new location while 4 the server is shut down and then correcting 3 the paths in the servers config file. After 2 that you should be able to restart the server 1 and connect MySQL Administrator to it.

Score: 0

Make sure you give the Network Service Full 5 permissions in the security tab of Windows 4 Explorer options. If the server can't read/write 3 etc. to the selected folder the service 2 will either not start or it will attempt 1 a start and shut right down.

More Related questions