Bug 277598

Summary: databases/mysql81-server: failed to start after pkg install
Product: Ports & Packages Reporter: Denis Shaposhnikov <dsh>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: New ---    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (joneum)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
the fix none

Description Denis Shaposhnikov 2024-03-09 16:22:46 UTC
Hi,

after `pkg install mysql81-server`, `service mysql-server start` failed to start the server. In the log I see

mysqld: Can't create/write to file '/var/db/mysql_tmpdir/ibe7JpUJ' (OS errno 13 - Permission denied)

And I see `/var/db/mysql_tmpdir` owned by root, instead of mysql user. Looks like the reason is pkg-plist, which has

@dir %%ETCDIR%%/keyring
@dir %%MY_SECDIR%%
@dir %%MY_TMPDIR%%

instead of

@dir(mysql,mysql,0750) %%ETCDIR%%/keyring
@dir(mysql,mysql,0750) %%MY_SECDIR%%
@dir(mysql,mysql,0750) %%MY_TMPDIR%%

like `databases/mysql80-server` has.
Comment 1 Denis Shaposhnikov 2024-03-10 13:46:43 UTC
Created attachment 249072 [details]
the fix