

# datadir=C:/ProgramData/MySQL/MySQL Server 8.0/Data Keep the previous value commented so that you won't have to remember it. Let's changeĭatadir value in my.ini file to this value.

Let's say you want your new data directory to be W:_MySQL_Data. Step - 3 : Replacing it with a new data directory. Used by MySQL in default setting (provided they haven't found another better location), but let's check that out.ĭo a CTRL+F to find out datadir in the file.Īctual location currently under use by MySQL for data directory. Step - 2 : Finding out the current Data directory Goto C:\ProgramData\MySQL\MySQL Server 8.0īy default, there should be a folder here named Data, this is the one which is Locate MySQL80 (80 is for version 8.0, look for the one you've). Now you want to make sure there is enough space to store large databases which you might create in future, and so you thought, Hey! I want to put it into another drive which has got more space. Well, in the end, it has to store them in the form of files with some added jugglery in the application and file format to ensure the Database promises that you learned in Databases classes are intact. MySQL uses a Data directory to store the data of different databases you create.
#DEFAULT OWNERSHIP OF NEW FOLDER WINDOWS#
In case you're a Windows user and landed here to find out that all answers are for Linux Users, don't get disappointed! I won't let you waste time the way I did.Ī little of bullshit talk before solution:
