How to Start or Stop MySQL Service

access_time 16 days ago visibility4 comment 0

Start MySQL service

To start MySQL service on a UNIX-alike system or on Windows Subsystem for Linux (WSL), simply run the following command:

sudo service mysql start

The output looks like the following:

 * Starting MySQL database server mysqld                                                                                No directory, logging in with HOME=/
                                                                                                             [ OK ]

Check MySQL service status

Run the following command to check service status:

$ sudo service mysql status
 * /usr/bin/mysqladmin  Ver 8.42 Distrib 5.7.32, for Linux on x86_64
Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Server version          5.7.32-0ubuntu0.18.04.1
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 1 min 35 sec

Threads: 1  Questions: 8  Slow queries: 0  Opens: 108  Flush tables: 1  Open tables: 26  Queries per second avg: 0.084

Stop MySQL service

To stop the service, simply run the following command:

sudo service mysql stop
 * Stopping MySQL database server mysqld                                                                      [ OK ]
copyright This page is subject to Site terms.
Like this article?
Share on

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

Follow Kontext

Get our latest updates on LinkedIn or Twitter.

Want to publish your article on Kontext?

Learn more

More from Kontext

visibility 6
thumb_up 0
access_time 19 days ago

Checking MySQL version can be done easily via mysql CLI or using SQL. $ mysql -V mysql Ver 14.14 Distrib 5.7.32, for Linux (x86_64) using EditLine wrapper We can either get it from database server variables or using version() function. mysql> show variables LIKE ...

visibility 4
thumb_up 0
access_time 16 days ago

To start MySQL service on a UNIX-alike system or on Windows Subsystem for Linux (WSL), simply run the following command: sudo service mysql start The output looks like the following: * Starting MySQL database server mysqld ...

visibility 8016
thumb_up 1
access_time 6 months ago

This article shows you how to filter NULL/None values from a Spark data frame using Python. Function DataFrame.filter or DataFrame.where can be used to filter out null values.

About column

SQL relational databases incl. SQLite, SQL Server, MySQL, PostgreSQL, Oracle, etc.