$tar xf mysql-advanced-5.6.21-linux-glibc2.5-x86_64.tar.gz -C /db/
使用二进制版的mysql-advanced-5.6.21-linux-glibc2.5-x86_64.tar.gz安装后,修改了
--log-error的路径,用mysqld_safe启动一直报错。必须到安装目录下启动才行。
1.查看mysqld_safe的路径
$ which mysqld_safe
/db/mysql5.6/bin/mysqld_safe
2.用mysqld_safe启动mysql,启动失败
$ mysqld_safe
141024 17:02:04 mysqld_safe Logging to '/usr/local/mysql/data/mysql02.err'.
touch: cannot touch `/usr/local/mysql/data/mysql02.err': No such file or directory
chmod: cannot access `/usr/local/mysql/data/mysql02.err': No such file or directory
141024 17:02:04 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
/db/mysql5.6/bin/mysqld_safe: line 129: /usr/local/mysql/data/mysql02.err: No such file or directory
3.mysqld_safe指定my.cnf启动mysql,失败
$ mysqld_safe --defaults-file=/db/mysql5.6/my.cnf
141024 17:02:28 mysqld_safe Logging to '/db/mysql5.6/logs/error_log_98_3316.err'.
141024 17:02:28 mysqld_safe The file /usr/local/mysql/bin/mysqld
does not exist or is not executable. Please cd to the mysql installation
directory and restart this script from there as follows:
./bin/mysqld_safe&
See http://dev.mysql.com/doc/mysql/en/mysqld-safe.html for more information
4. 根据提示进入到MYSQL安装路径,启动OK
Please cd to the mysql installation directory and restart this script from there as follows
为什么呢?是个bug吗?
$ cd mysql5.6/
$ ./bin/mysqld_safe &
[1] 13192
$ pidof mysqld
13908