-- the command of slow.sh was failed
ERROR 2006 (HY000) at line 1: MySQL server has gone away
ERROR 2006 (HY000) at line 1: MySQL server has gone away
cp: missing destination file operand after `.0402_0800'
Try `cp --help' for more information.
cp: missing destination file operand after `/dev/null'
Try `cp --help' for more information.
猜测应该是密码错误导致的登陆故障, 仔细监测运行slow的脚本,发现如下语句
slowlog_dir=`$MYSQL_HOME/bin/mysql -N -e "show variables like 'slow_query_log_file'"|awk '{print $2}'| cut -f1-3 -d '/'`
没有代入用户名密码,如果加上用户名密码参数.那么就OK了!
本文解决了一个使用MySQL时遇到的连接故障问题,通过分析错误信息和慢查询日志文件配置,发现未正确代入用户名密码参数。文章详细解释了如何在脚本中正确配置MySQL连接参数,确保顺利连接数据库。
3174

被折叠的 条评论
为什么被折叠?



