MySQL Forums
Forum List  »  Newbie

Changing the Data Directory of MySQL Comm'ty Ed'n
Posted by: Kirby Dehnel
Date: October 15, 2023 06:18PM

Hello. I have MS Windows and I'm using the "development environment" called Laragon with Apache, PHP, & MySQL. I've been trying to get the MySQL data directory for version 8 changed from its default of "mysql-8". When I change this in the file "my.ini" (even first after a re-boot and before any MySQL services get loaded), that same data directory of "mysql-8" just gets re-created and that line in "my.ini" gets re-written with the data directory name of "mysql-8".

I've done all the text searching I can think of to hunt down where this directory name might be lingering around, but I find nothing.

I tried the command line interface some days ago and the commands themselves were successful but even after re-booting, when I start up MySQL it went right back to creating the directory of "mysql-8".

So I've been wondering if this data directory name is actually hard-coded??? Is there really no way to change this??? My reasoning is that I want the same data directory name as for the pre-8 version of MySQL since the directory name of "mysql" is where the database is stored, and one of my own little nuances is that I don't like version numbers in directory names, only the program name, but this personal preference I'm willing to set aside if need be.

Hoping this is simple, and thank you,
Kirby D

Options: ReplyQuote


Subject
Written By
Posted
Changing the Data Directory of MySQL Comm'ty Ed'n
October 15, 2023 06:18PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.