tags:

views:

5600

answers:

4

Dear all, I would like to change the database files location of MySQL administrator to another drive of my computer. ( i run windows xp SP2, mySQL Administrator 1.2.8) --Under the startup variable --> General Parameters --> i change the Data directory: C:/Program Files/MySQL/MySQL Server 5.0/data to D:/..... but after i stop the service and restart it, the following error came out :

Could not re-connect to the MySQL Server. Server could not be started.

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

Anyone used to face this problem ?

+2  A: 

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 work I have no idea. On linux you can try to move the socket to a new location too, but that shouldn't affect windows. Alternatively you can use a symbolic link on *nix what most people do I guess.

Armin Ronacher
A: 

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

Silver Dragon
A: 

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

Daniel Schneller
A: 

Thanks for your help Armin Ronacher.... i added one line in my.ini file is [mysql_safe] datadir=D:/_sql And now it is work. I am a new in this website, i am very appreciated with all of your help. I'm gonna register my name in here too.

vuthaKH