Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

My OS is OS X, I installed MySQL Percona via brew. Error log of MySQL was /usr/local/var/mysql/xxx.local.err. After that I tried to run mysql_install_db and rebooted machine. OK, but now I see see in syslog

Aug 17 03:17:47 xxx com.apple.launchd.peruser.501[247] (homebrew.mxcl.percona-server[29906]): Exited with code: 1
Aug 17 03:17:47 xxx com.apple.launchd.peruser.501[247] (homebrew.mxcl.percona-server): Throttling respawn: Will start in 10 seconds
Aug 17 03:17:58 xxx com.apple.launchd.peruser.501[247] (homebrew.mxcl.percona-server[30026]): Exited with code: 1
Aug 17 03:17:58 xxx com.apple.launchd.peruser.501[247] (homebrew.mxcl.percona-server): Throttling respawn: Will start in 10 seconds
...

OK, I try to run it manually:

$ /usr/lo/usr/local/opt/percona-server/bin/mysqld_safe

130817 03:14:07 mysqld_safe Logging to './data/mysql/xxx.local.err'.
touch: ./data/mysql/xxx.local.err: No such file or directory
chmod: ./data/mysql/xxx.local.err: No such file or directory
130817 03:14:07 mysqld_safe Starting mysqld daemon with databases from ./data/mysql
/usr/local/opt/percona-server/bin/mysqld_safe: line 135: ./data/mysql/xxx.local.err: No such file or directory
/usr/local/opt/percona-server/bin/mysqld_safe: line 172: ./data/mysql/xxx.local.err: No such file or directory
touch: ./data/mysql/xxx.local.err: No such file or directory
chown: ./data/mysql/xxx.local.err: No such file or directory
chmod: ./data/mysql/xxx.local.err: No such file or directory
130817 03:14:07 mysqld_safe mysqld from pid file ./data/mysql/xxx.local.pid ended
/usr/local/opt/percona-server/bin/mysqld_safe: line 135: ./data/mysql/xxx.local.err: No such file or directory

I have 2 questions:

  1. Why location of error log was changed from /usr/local/var/mysql/xxx.local.err to ./data/mysql/xxx.local.err?
  2. How do I fix it? Creation of dir /usr/lo/usr/local/opt/percona-server/bin/data/mysql does not solve the problem.
share|improve this question
    
mkdir /usr/local/opt/percona-server/data/mysql/ –  GioMac Aug 16 '13 at 23:31
    
i believe, ./data/mysql/ is relative to prefix –  GioMac Aug 16 '13 at 23:37
    
Thanks! That dir (relative to my.cnf) already exists, but I changed datadir to absolute path and now it works. –  Misanthrope Aug 17 '13 at 11:28
add comment

1 Answer 1

Answer of your first question:

When you compile a program, you use "configure --prefix=your primative path", configure command is capable to classify each path of your program, maintainer of your mysql server,separate path of log files, pid file, binary files, sbin, and so on.

Answer of your second question:

in my.cnf , you can change path of pid file. socket file ,basedir, datadir , tmpdir and lc-messages-dir

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.