一:启动错误:
STOPPING server from pid filexxxx.pid
mysqld ended
有下面两句:
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: Cannot continue operation.
mysqld ended
原来是权限问题:
解决方法:
#> chown -R root .
#> chown -R mysql data
#> chgrp -R mysql
再启动即可。
二:linux环境变量相关知识。
例如执行:mysqldump提示:-bash:command not found
是环境变量设置的问题:
你用env查看环境变量。
PATH=/usr/local/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
没有mysql的。
添加:export PATH=$PATH:/usr/local/mysql/bin(就是你的mysql安装目录下的bin目录)
永久设置:
在该用户的目录下,例如root是/root下面,编辑.bash_profile,添加/usr/local/mysql/bin,
保存退出后执行:source .bash_profile即可。