Вопрос

Running out of storage space on disk (machine running win7 SP1 x64), was looking into what files were taking up the most space, noticed that MySQL is storing same data at the following 2 locations:

C:\ProgramData\MySQL
C:\Users\All Users\MySQL

All files in both folders are of the same size, same modification date, etc. The tables have been encrypted with Encrypting File System. Basedir and datadir in C:\ProgramData\MySQL\MySQL Server 5.6\my.ini are as follows:

basedir="C:/Program Files/MySQL/MySQL Server 5.6/"
datadir="C:\ProgramData\MySQL\MySQL Server 5.6/Data"

I am wondering why the data is being stored in both places, and what would happen if we were to move the folders elsewhere.

Thanks in advance!

Это было полезно?

Решение

https://superuser.com/a/405105/116475:

Only C:\ProgramData actually exists as a "real" folder. C:\Users\All Users is a symbolic link to C:\ProgramData. That is, C:\Users\All Users points to C:\ProgramData, so if you navigate to the former, you are automatically redirected to the latter. That is why they appear identical.

Другие советы

Are you sure you did not copy the data, or having a script that copies the data to both location? Do you run multiple mysql instances on the machine? check your running services/processes!

As the

basedir is the path to the MySQL installation directory.

and

datadir is the path to the MySQL data directory. (your data should only be here!)

Just to be sure, can you execute this...

mysql> select @@datadir;

...and show us the output please!

Are the files exactly the same size? check bytes! check timestamp (last modified)!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top