i am misserable

i’ve been trying for hours to install mysql on my g5. i’ve been doing everything vanilla. i keep getting this:

$ mysqld_safe
touch: /usr/local/mysql/data/g5bachir.local.err: Permission denied
chown: /usr/local/mysql/data/g5bachir.local.err: Permission denied
Starting mysqld daemon with databases from /usr/local/mysql/data
/usr/local/mysql/bin/mysqld_safe: line 302: /usr/local/mysql/data/g5bachir.local.err: Permission denied
rm: /usr/local/mysql/data/g5bachir.local.pid: Permission denied
/usr/local/mysql/bin/mysqld_safe: line 308: /usr/local/mysql/data/g5bachir.local.err: Permission denied
STOPPING server from pid file /usr/local/mysql/data/g5bachir.local.pid
tee: /usr/local/mysql/data/g5bachir.local.err: Permission denied
050130 04:57:25  mysqld ended
tee: /usr/local/mysql/data/g5bachir.local.err: Permission denied

even after chowning everything to mysql, chmoding o+w, et cetera

any ideas?

update: I’ve solved it!.

12 Responses to “i am misserable”


  1. 1 josh

    do you know which user the safe daemon is running with? Maybe it’s not ‘mysql’? Anyway, can you just chmod -R 777 * in the data dir (or even the whole mysql dir), then pull back perms after that?

  2. 2 JJB

    hmm, well it dies differently now. i’ve seen this behvior before. i’m not sure what the circumstances are.

    john@g5bachir:~$ sudo chmod -R 777 /usr/local/mysql
    john@g5bachir:~$ mysqld_safe
    Starting mysqld daemon with databases from /usr/local/mysql/data
    STOPPING server from pid file /usr/local/mysql/data/g5bachir.local.pid
    050130 17:20:22 mysqld ended

  3. 3 Troy Johnson

    try this:

    sudo mysqld_safe

    to start it.

    mysqld_safe probably changes it’s effective user id, which may be something only root can do.

  4. 4 Troy Johnson

    If that works, you can probably set the file ownership back to their original values and see if it still works. It will be a bit more secure that way.

  5. 5 JJB

    Hi troy (the first non-acquaintance commenter on my blog :-) )

    That doesn’t work either:

    john@g5bachir:~$ sudo mysqld_safe
    Password:
    Starting mysqld daemon with databases from /usr/local/mysql/data
    STOPPING server from pid file /usr/local/mysql/data/g5bachir.local.pid
    050202 03:01:14 mysqld ended

    john@g5bachir:~$ su -
    Password:
    g5bachir:~ root# /usr/local/mysql/bin/mysqld_safe
    Starting mysqld daemon with databases from /usr/local/mysql/data
    STOPPING server from pid file /usr/local/mysql/data/g5bachir.local.pid
    050202 03:01:41 mysqld ende

  6. 6 JJB

    here’s some more info. from the error log (and no, i don’t have another mysqld running):

    # cat /usr/local/mysql/data/127.0.0.1.err
    050205 14:18:37 mysqld started
    050205 14:18:37 [Warning] Setting lower_case_table_names=2 because file system for /usr/local/mysql/data/ is case insensitive
    050205 14:18:37 [ERROR] Can’t start server : Bind on unix socket: Permission denied
    050205 14:18:37 [ERROR] Do you already have another mysqld server running on socket: /tmp/mysql.sock ?
    050205 14:18:37 [ERROR] Aborting

    050205 14:18:37 [Note] /usr/local/mysql/bin/mysqld: Shutdown complete

    050205 14:18:37 mysqld ended

  7. 7 Peter Pan

    It’s a known bug.
    And it hasn’t been fixed, no matter what this thread claims.
    http://bugs.mysql.com/bug.php?id=7535

  8. 8 JJB

    Check out this link for my solution

  9. 9 JJB
  10. 10 Peter Pan

    Great. Thats the solution. Spread the word!

  11. 11 Trevor

    I had the same problem. Seems I already had another MySQL process running somehow! After killing it, I was able to run mysqld_safe successfully.

  12. 12 Robert

    I fixed this problem on my server.

    Somehow when I stopped mysqld, the owner of /var/run/mysqld (the location of the pid) was obliterated — the folder was owned by no one. I chown’d it back to mysql and mysqld started up normally. Hope this helps someone.

Leave a Reply




Close
Powered by ShareThis