找到my.cnf
在my.cnf中:
datadir = d:/mysql/data/
//改变其值。

解决方案 »

  1.   

    数据目录的位置可以在启动服务器时通过--datadir==/path/to/dir 明确指定。
    my.cnf 在windows版本中好像没有这个文件。
      

  2.   

    在安装MySQL时有提到,在WINDOWS下可以将这个my.cnf放在\windows\目录下(98)或是\winnt\下,原文如下:NOTE: If you install MySQL in a folder other than
    C:\MYSQL or you intend to start MySQL on NT/Win2000
    as a service, you must create a file named C:\MY.CNF
    or \Windows\my.ini or \winnt\my.ini with the following
    information::[mysqld]
    basedir=E:/installation-path/
    datadir=E:/data-path/After your have installed MySQL, the installation
    directory  will contain a file named 'my-example.cnf'.
    You can use this as a starting point for your own
    C:\my.cnf file.