Start/Stop/restart MySQL database under Ubuntu Server

Source: Internet
Author: User
Tags mysql database

System environment: ubuntu server 12.10x64 (mysql comes with the system)

When we need to modify the MySQL configuration file my. cnf (my. ini in windows) for some settings, we need to restart MySQL after the modification.

The path of my. cnf file is/ect/mysql/my. cnf.

Waring: MySQL cannot be started if the file is configured incorrectly.

The following describes how to start, stop, and restart MySQL:

Start mysql:
Method 1: sudo/etc/init. d/mysql start
Method 2: sudo start mysql
Method 3: sudo service mysql start

Stop mysql:
Method 1: sudo/etc/init. d/mysql stop
Method 2: sudo stop mysql
Method san: sudo service mysql stop

Restart mysql:
Method 1: sudo/etc/init. d/mysql restart
Method 2: sudo restart mysql
Method 3: sudo service mysql restart

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: 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.