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.