Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start any database if home directory is on external volume #139

Open
runforrestrun opened this issue Mar 24, 2024 · 4 comments
Open

Comments

@runforrestrun
Copy link

Please fill out the detail below, it helps me investigate the bug:

Issue:
Can't start any database if home directory is on external volume. This probably has to do with permission, execution rights.

  1. Driver (Ex: PostgreSQL 10.0):
    Any driver

  2. DBngin build number:
    Any build 7.0, and I believe any version has this issue

  3. macOS version:
    Sonoma 14.4 but I think any MacOS version has this issue

  4. The steps to reproduce this issue:

  5. Go to Settings > Users & Groups.

  6. Create a new user (of type administrator) on MacOS

  7. Right click the user, and choose "Advanced Options"

  8. Change Home directory to an external volume

  9. Reboot MacOS

  10. Login as the created user

  11. Create a database with DBngin

  12. Click start

  13. Refresh, and see that it hasn't been started

Suboptimal solution:
image

Unchecking "Ignore ownership on this volume" resolves. But that's a too drastic measure.

Can you please take a look and see whether this is fixable in another way?

@manuelbua
Copy link

I've a similar problem: the MySql data directory i choose is on a removable drive and manually running the plist file show an input/output error:

launchctl load com.tinyapp.DBngin.mysqld..
Load failed: 5: Input/output error

Inspecting the plist file and manually executing the invocation command in a terminal works just fine (running with sudo as the --user option requires it):

sudo /Users/Shared/DBngin/mysql/8.0.33/bin/mysqld --disable-log-bin --socket=/tmp/mysql_3306.sock --user=_mysql --port=3306 --basedir=/Users/Shared/DBngin/mysql/8.0.33 --datadir=/Volumes/extdata/dev/db/mysql/8.0.33 --plugin-dir=/Users/Shared/DBngin/mysql/8.0.33/lib/plugin --log-error=/Volumes/extdata/dev/db/mysql/8.0.33/mysqld.local.err --pid-file=/Volumes/extdata/dev/db/mysql/8.0.33/mysql.pid

I wonder if this problem is related to launchctl?

@runforrestrun
Copy link
Author

@manuelbua any clue how to debug this?

@manuelbua
Copy link

I'm unable to debug the launchctl call as it doesn't really log anything anywhere.
Other than running the command inside the plist and seeing that it works fine, i'm not sure if launchctl is expecting something i don't know.

I'm in the middle of the process of setting up a new machine for development work and i tried a few things without success. I read that launchctl may refuse to execute/load plist files if they are located in an unsafe place, but mysqld lies on the OS partition in /Users/Shared/DBngin and only the data directory for MySql is on a drive whose ownership is ignored.

I'm also unsure on what to do: since i'm going to use the disk as an internal one (it's an M.2 disk placed in a MacMini dock), unchecking the "Ignore ownership on this volume" seems a sensible option for my use-case, but i would really love to know how to solve this without modifying that volume option.

Any devs around that may be able to point us in the right direction?

@runforrestrun
Copy link
Author

runforrestrun commented Apr 3, 2024

I also had this problem with an installation of mysql 5.7 with brew.
brew services start mysql never worked
I always had to start the server manually by using mysql.server start

This smells like the same issue. I hope that DBngin can somehow execute it differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants