I have MySQL data files on a thumb drive that are used on two hosts where
mysql user's UIDs differ. As a result, MySQL fails to start when it's files have
0700 perms and an unknown UID as an owner.
I failed to find how to change MySQL's umask (and actually I don't like the idea of sharing these files to everyone), therefore I want to change UID of
mysql user on both hosts so the files belong to the same user.
I'm going to change the UID and to
chown all files owned by old mysql UID to the new user:
usermod --uid 900 --gid 900 mysql # assign the new uid olduid=67 find / -user $olduid -group $olduid -print0 | xargs -0 chown "mysql:mysql"
Is this sufficient for an application to work in general case? Maybe, I have better options?