Changing data directory on MacOS Somona
I just installed MySQL 8.2 on my Mac. It stores data in /usr/local/mysql/data/ by default, where _mysql user and _mysql group owns the directory. I created a new data directory in the root of the external drive. Using System Setting I pointed the data directory to the one created on my external drive.
Doing this, the server doesn't start. This is the error log:
2023-11-20T08:28:39.195307Z 0 [System] [MY-010116] [Server] /usr/local/mysql/bin/mysqld (mysqld 8.2.0) starting as process 3811
2023-11-20T08:28:39.224697Z 0 [Warning] [MY-010091] [Server] Can't create test file /Volumes/MacExternal/MySQL/mysqld_tmp_file_case_insensitive_test.lower-test
2023-11-20T08:28:39.224723Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /Volumes/MacExternal/MySQL/ is case insensitive
mysqld: File './binlog.index' not found (OS errno 1 - Operation not permitted)
2023-11-20T08:28:39.232188Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-11-20T08:28:39.232340Z 0 [System] [MY-010910] [Server] /usr/local/mysql/bin/mysqld: Shutdown complete (mysqld 8.2.0) MySQL Community Server - GPL.
2023-11-20T08:28:39.233095Z 0 [System] [MY-015016] [Server] MySQL Server - end.
So I changed the permissions on /Volumes/MacExternal/MySQL/ to 777, but MySQL still has the same problem. I even tried to change ownership of the external directory:
sudo chown _mysql:_mysql MySQL
, but it's not possible ( nothing happens after the command is issued ). So I gave MySQL full disc access, but it didn't help as well. Any idea, how I can move the database directory?
Subject
Written By
Posted
Changing data directory on MacOS Somona
November 20, 2023 09:50AM
December 19, 2023 09:26AM
Sorry, you can't reply to this topic. It has been closed.
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.