Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11510
  • 博文数量: 3
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2016-12-07 13:12
文章分类
文章存档

2017年(3)

我的朋友
最近访客

分类: LINUX

2017-02-28 08:41:00


部署服务的时候遇到这个问题,就简单记录下哦

#/etc/init.d/MySQLd restart
stopping mysql   [ok]
Timeout error occurred trying to start MySQL Daemon. [failure] 
但是这个时候mysql实际上已经起动了,因为用netstat -ln命令去看3306端口已经起动.运用 mysql -u root -p password也可以 连接到数据库.
  
处理 要领 :
修改/etc/init.d/mysqld.
在mysql里建立 dameon用户,然后再修改/etc/init.d/mysqld.
具体操作如下:
我们不妨先看看/etc/init.d/mysqld起动脚本是如何 工作的,留心 下面的一段
# If you've removed anonymous users, this line must be changed to
    # use a user that is allowed to ping mysqld.
    ping="/usr/bin/mysqladmin -uUNKNOWN_MYSQL_USER ping"
    # Spin for a maximum of ten seconds waiting for the server to come up
    if [ $ret -eq 0 ]; then
      for x in 1 2 3 4 5 6 7 8 9 10; do
      if [ -n "`$ping 2> /dev/null`" ]; then
          break;
      else
          sleep 1;
      fi
      done
      if !([ -n "`$ping 2> /dev/null`" ]); then
          echo "Timeout error occurred trying to start MySQL
Daemon."          action $"Starting $prog: " /bin/false
      else
          action $"Starting $prog: " /bin/true
      fi
    else
      action $"Starting $prog: " /bin/false
    fi
    [ $ret -eq 0 ] && touch /var/lock/subsys/mysqld
    return $ret 


阅读(2871) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:解析linux根文件系统的挂载过程

给主人留下些什么吧!~~