Timeout error occurred trying to start MySQL Daemon

Source: Internet
Author: User

#/etc/init.d/mysqld restart

stopping MySQL [OK]

Timeout error occurred trying to start MySQL Daemon. [Failure]

But this time MySQL actually started, because with the NETSTAT-LN command to see 3306 Port has started. You can also connect to a database using mysql-u root-p password.

Workaround:

Modify/etc/init.d/mysqld.

Create Dameon users in MySQL, and then modify/etc/init.d/mysqld.

The specific actions are as follows:

Let's take a look at how the/etc/init.d/mysqld start script works, and note the following

# 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.