MySQL duplicating all data at C:\ProgramData\MySQL and C:\Users\All Users\MySQL?
Asked Answered
S

2

6

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!

Sample answered 30/9, 2013 at 19:25 Comment(1)
could you share your configuration/startup file?Goiter
W
4

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.

Wert answered 1/10, 2013 at 7:12 Comment(0)
G
0

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)!

Goiter answered 30/9, 2013 at 19:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.