Linux mysqld start-up process

Source: Internet
Author: User

Under Linux, the MySQL service starts and shuts down:

The correct way is to go into the MySQL bin directory and then execute

./mysqladmin-uroot-p shutdown
Then enter your password to do so.

If your root does not have a password, you do not need the-p option.

The correct way to start is: Go to the MySQL bin directory and nohup./mysqld_safe &.



Start and stop the MySQL service


1. Start the MySQL service

The command to start the MySQL service is:

/etc/init.d/mysqld start
The command executes after 7-5, indicating that the MySQL service started successfully.

(Click to view larger image) Figure 7-5 start the MySQL service
You can also start the MySQL service with/etc/init.d/mysqld's simplified commands:
Service mysqld Start
The command executes as shown in result 7-6.

(Click to view larger image) Figure 7-6 Service command to start MySQL services
2. Stop the MySQL service

The commands to stop the MySQL service are:

W/etc/init.d/mysqld stop
The command executes after 7-7, indicating that the MySQL service was stopped successfully.

(Click to view larger image) Figure 7-7 Stop MySQL Service
You can also stop the MySQL service with service commands. As shown in 7-8.

(Click to view larger image) Figure 7-8 Service command stop MySQL Services
3. Restart the MySQL service

The command to restart the MySQL service is:

/etc/init.d/mysqld restart
The command executes after 7-9, indicating a successful restart of the MySQL service.

(Click to view larger image) Figure 7-9 restarting the MySQL service
You can also stop the MySQL service with service commands. As shown in 7-10.

(Click to view larger image) Figure 7-10 Service command to restart MySQL services
4. Start the MySQL service automatically

If you need to have the MySQL service automatically load with the system boot, you can execute the "NTSYSV" Command automatic service configuration program, find the "mysqld" service, press the SPACEBAR to precede it with "*" asterisk, and then press the TAB key, select "OK", 7-11.


(Click to view larger image) Figure 7-11 set the MySQL service to run automatically


or reboot directly

$mysql _dir/bin/mysqladmin-u root-p shutdown
$mysql _dir/bin/safe_mysqld &

Linux mysqld start-up process

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.