MySQL Forums
Forum List  »  Newbie

Re: Changing the Data Directory of MySQL Comm'ty Ed'n
Posted by: Barry Galbraith
Date: October 15, 2023 11:26PM

Check what defaults file MySQL is using. Run "services.msc", find your MySQL service, right click, Properties. In General tab, path to executable, check the defaults-file=
Mine shows this
Quote

--defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"

That's the file where you need to change the datadir directive in the [mysqld] section. Make sure the file is saved after you edit it.
Whatever directory you change it to, you'll need to grant the MySQL process full access to that directory. Hint: MySQL is usually owned my "Network Service", so that is the owner you will need to grant permission to.
Stop MySQL service, and copy the contents of the existing data folder to the new data folder, and start the service. MySQL should be using the new folder.
All that said, who knows what Laragon is doing with your data folder and my.ini file. You might need to ask the Laragon people.

Good luck,
Barry.

Options: ReplyQuote


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


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.