Hi!!
{From Manual}
On Windows, the MySQL installer places the data directory directly under the directory where you install MySQL. If you would like to use a data directory in a different location, you should copy the entire contents of the data directory to the new location. For example, by default, the installer places MySQL in C:\Program Files\MySQL\MySQL Server 4.1 and the data directory in C:\Program Files\MySQL\MySQL Server 4.1\data . If you want to use a data directory of E:\Data, you must do two things:
Move the data directory from C:\Program Files\MySQL\MySQL Server 4.1\data to E:\Data.
Use a --datadir option to specify the new data directory location each time you start the server.
Also you can do this by updating the option file contents..(my.ini/my.cnf)..
you can create the option file and set up a [mysqld] section to specify values for the basedir and datadir parameters:
[mysqld]
# set basedir to your installation path
basedir=E:/mysql
# set datadir to the location of your data directory
datadir=E:/data
For more check out this link..
http://dev.mysql.com/doc/mysql/en/windows-create-option-file.html
Regards,
Umesh Shastry
http://www.blogger.com/profile/02551756983528645221