Local MySQL Owner and Permissions

I asked this question on MySQL forums and did not get an answer, so I will try here.

I recently successfully installed the 64-bit version of mysql-5.5.8 on a MacBook Pro in the / usr / local directory.

To access completely unrelated software (RVM actually), I chown-ed my / usr / local directory in USER, which made MySQL unhappy. He particularly complained about the directory / usr / local / mysql / data, so I edited this directory on _mysql: wheel.

Everything seems to work again, but it made me wonder if it would be better to change the owner of the whole / usr / local / mysql directory, and not just the data subdirectory.

Since I neglected to take notes on which owner works by default, can someone tell me which owner and permissions for the / usr / local / mysql directory are by default if you do not accidentally screw it in? : - /

I assume rwxr-xr-x will be suitable for permissions (that the data directory currently has and seems to be working fine), but reinforcement for this hunch would be appreciated.

Thanks for any help.

Steve

+3
source share
2 answers

I had a similar problem when, fixing the problem with the / user / local permissions, I could no longer see any of my databases.

This fixed this:

which mysql

What returned

$ /usr/local/mysql/bin/mysql

Then I went to the mysql root directory and reset the property:

cd /usr/local/mysql
sudo chown -R mysql .
sudo chgrp -R mysql .

After mysql reboot, my databases returned.

: https://dev.mysql.com/doc/refman/5.6/en/data-directory-initialization.html

+2

Mac , .

my.cnf ​​ [mysqld]:

user            = mysql

, .

- , , SGID. , .

, : http://www.library.yale.edu/wsg/docs/permissions/sgid.htm.

0

Source: https://habr.com/ru/post/1787563/


All Articles