Women in Technology

Hear us Roar

  Apache Web-Serving With Mac OS X, Part 5
Subject:   chown probs?
Date:   2002-06-10 00:37:49
From:   hooplah
First - the articles are great and I look forward to more.

Second...I was having problems keeping open connections to the database (mysql ended) and read through some of the posts.

I tried the various chown directives suggested - but alas to no avail.

I don't have a var directory to change ownership of, I'm afraid. I did notice that the only files in the var directory of the compiled install were the database and log files - and the pkg installer keeps said files housed in a data folder.

I did the chown command on the data folder and lo! It worked swimmingly!

sudo chown -R mysql /usr/local/mysql/data

I guess my big question now is why? That's the frustrating part.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • chown probs?
    2002-06-14 09:45:10  psmalera [View]


    About 5 minutes before reading your post I did the exact same thing and it also worked like a charm.

    Not sure what the scope of your "why" question is... on a technical level, I think it's because mysql needs to be able to read and write to that table, and it can't do so as long as root owns it and the permissions are restrictively set. My guess is that chmod 777 on the same table would've accomplished the same thing, but I can't see any reason why root should own that table.

    Then again, I am a unix newbie, and I know it's dangerous to mess around with permissions like that without understanding the potential for hacking. If I were doing this on a job, I would do a little more research about exactly what exactly the best resolution is-- my guess tho (which is what you and I did) is to chown to mysql-- then, the permissions can still be restrictive since only the mysql account is used to work with the data.