Change MySQL existing datadir path

When installing MySQL for Windows using the MSI, the location of my.ini is expected to be C:/ProgramData/MySQL/MySQL Server 5.1.

Please run the following in a DOS Window:

cd C:/ProgramData/MySQL/MySQL Server 5.1
dir *.ini

You will see some sample my.ini files. However, if there is no file named my.ini in that folder, you must create one. Whether one exists or not, please run this:

cd C:/ProgramData/MySQL/MySQL Server 5.1
notepad my.ini

If you are asked to create it, please do so. Continue reading

Error dropping database (can’t rmdir ‘.\abm’, errno: 41) on windows in mysql server.

Proceed cautiously. You don’t want MySQL’s internal structures to become inconsistent with what’s on the disk.

Run the query SELECT @@DATADIR; to find the directory that should contain a folder for each of your databases, including one called abm.

Contrary to the advice offered in the other question, don’t delete the abm folder once you find it. Instead, leave the folder there, and move the files inside it somewhere outside the datadir where MySQL can’t see them.

Then try again to drop the database the normal way.

Finally, restart MySQL to be absolutely sure that its internal structures are consistent with the disk files, by reviewing the log for errors. If the server restarts with no errors, and the database is no longer listed, it should be safe to delete the stray files you copied out of harm’s way, above.