[ACCEPTED]-Change database files location in MySQL administrator?-mysql
Normally it works like this:
- shut down MySQL
- change the
[mysqld]
and[mysqld_safe]
datadir
variable in the MySQL configuration - change the
basedir
variable in the same section. - move the location over
- 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.
In Windows
- Navigate to
C:\Program Files\MySQL\MySQL Server 5.4\
and locate themy.ini
file - 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
- 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. - Restart the MySQL Server in Control Panel > Administrative Tools > Service
0
You also have to manually modify mysql's 1 configuration (usually my.conf)
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.
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
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.