Solve the problem that mysql cannot be started using service installed in ubuntu.

Source: Internet
Author: User

Install mysql from ubuntu today

The code is as follows: Copy code

Apt-get install mysql-server

Found at startup
Service mysql start

Rather than invoking init scripts through/etc/init. d, use the service (8)
Utility, e.g. service mysql start
 
Since the script you are attempting to invoke has been converted to
Upstart job, you may also use the start (8) utility, e.g. start mysql
Start: Job failed to start
I had a hard time investigating all kinds of information.
One of the explanations

Starting Ubuntu now and disabling the service cannot use/etc/rc *. d/init. d/{Service} {start | stop | restart} is used. You need to use service {Service} {start | stop | restart }. After searching on the Internet, we found that upstart was introduced after Ubuntu10.04 to manage self-starting services. The old system management is called SysV, which controls the automatic startup of the service by setting up scripts in the directory representing each run level. For example, scripts starting with S in the/etc/rc0.d directory will be run at runlevel 0. In this way, if you want to shield a service, you need to rename the one starting with S to start with K. Therefore, all scripts under rc *. d are linked to the/etc/init. d Directory. Upstart adopts a completely different method. It requires all the startup scripts, which are actually configuration files created in the/etc/init Directory. Each service has a file that defines the running levels, conditions, and events of script startup and shutdown,. We can see that Upstart is much better than SysV, because SysV starts linearly and sequentially. An S20 service must wait until S19 is started. If it takes a lot of time to start a service, even if the subsequent services are completely irrelevant, you must wait. In Upstart, service startup is based on events and is parallel. As long as an event occurs, the service can be started concurrently. This method is undoubtedly much better, because it can take full advantage of the current multi-core features of the computer, greatly reducing the time required to start.

I didn't understand it at the time, but this article explains the ubuntu upgrade mechanism.

Later

The code is as follows: Copy code
Apt-get upgrade

Upgrade the system

Then you can just

The code is as follows: Copy code

Service mysql start

If you encounter the same problem, I hope this article will prevent you from suffering from me any more. Take so many detours.

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.