MySQL database startup and Shutdown

Source: Internet
Author: User

MySQL database startup and Shutdown

MySQL database server usually refers to mysqld, while command line mysql is a mysql client program. These two concepts are often confusing. Generally, the mysql server is started to start the mysqld process. After mysqld is started, you can connect to the mysql server through mysql. This article describes how to start a mysql server and how to disable it.

1. Start directly with mysqld

# Current mysql server running environment

2. mysql secure startup (mysqld_safe)

# Use mysqladmin to disable the mysql server that was previously started

# Use mysqld_safe to start the instance

# View background processes after startup

[Root @ rhel64a ~] # Mysql-uroot-pxxx-P3306 -- protocol = tcp

Root @ localhost [(none)]> select databases ();

3. mysql (mysql. server) Service Startup

# First, use mysqladmin to disable the existing mysqld.

[Root @ rhel64a ~] # Ls-hltr/etc/init. d/mysql #/etc/init. d directory has configured the mysql STARTUP script. Add

[Root @ rhel64a ~] #/Etc/init. d/mysql -- help # obtain mysql STARTUP script help

# By default, mysql has been added to the system directory as a service and configured to start automatically, as shown below:

4. Shut down the mysql server

5. Summary

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.