Как перезапустить сервер mysql в windows

How do I restart MySQL on Windows 7? I'm using HeidiSql as a front end and there's no option in there. The only other things I have is the MySQL 5.5 command line client.

How do I restart MySQL on Windows 7?

I’m using HeidiSql as a front end and there’s no option in there.

The only other things I have is the MySQL 5.5 command line client.

the's user avatar

the

20.4k11 gold badges67 silver badges101 bronze badges

asked Oct 19, 2012 at 10:33

Norman's user avatar

Open the command prompt and enter the following commands:

net stop MySQL   
net start MySQL

the MySQL service name maybe changes based on the version you installed.
In my situation, MySQL version is MySQL Server 5.7.
So I use the following command

net stop MySQL57   
net start MySQL57

the's user avatar

the

20.4k11 gold badges67 silver badges101 bronze badges

answered Oct 19, 2012 at 10:35

ORION's user avatar

ORIONORION

2,3341 gold badge23 silver badges31 bronze badges

7

You can restart the service through the UI by following these steps:

  1. Open task manager (may need to run as administrator)

  2. Click on the «Service» button and find the «MySql» service

    NOTE: In some cases, the «MySql» service will be named whatever you named the initial database when you created the server. For example, if you called the initial database «myfirstdb», then the service would be called «myfirstdb». You should be able to find the service by sorting by the «Description» column as the description will be blank.

  3. Right-click on the «MySql» service and choose the «Restart» option

Thanks to @Doug_Ivison and @Lucky for the service name notes and «run as administrator» clarification in the comments.

enter image description here

enter image description here

Tim Hutchison's user avatar

answered Jan 29, 2014 at 15:20

Frizz1977's user avatar

Frizz1977Frizz1977

1,09113 silver badges21 bronze badges

4

In Windows,

  • Open Run Window by Win+R
  • Type services.msc
  • Search MySQL service (Sometimes found as MySQL56 or MySQL57) based on version installed.
  • Click stop, start or restart the service option.

answered Sep 22, 2016 at 14:36

Lucky's user avatar

LuckyLucky

16.5k19 gold badges117 silver badges151 bronze badges

1

These suggestions so far only work if the mysql server is installed as a windows service.

If it is not installed as a service, you can start the server by using the Windows Start button ==> Run, then browse to the /bin folder under your mysql installation path and execute mysqld. Or just open a command window in the bin folder and type: mysqld

answered Apr 21, 2014 at 21:49

Jeff Northrup's user avatar

First try:

net stop MySQL   
net start MySQL

If that does not work, try using the windows interface:

Start > Control Panel > System and Security > Administrative Tools > Services

Look for your version of MySQL (In my case — MySQL55), highlight and click the green start arrow. The status should change to «Started»

answered Apr 27, 2015 at 16:10

Amac's user avatar

AmacAmac

1581 silver badge6 bronze badges

use net stop mysql57 instead, it should be the version that is not specified

answered Dec 18, 2014 at 17:16

Oussama L.'s user avatar

Oussama L.Oussama L.

1,8326 gold badges25 silver badges31 bronze badges

I just have the same problem, just open the task manager, go to services tab and search MySQL_One service, rigth click and start, this works for very good.

answered Mar 16, 2016 at 23:36

Aldo Escobar's user avatar

Ctrl + alt +delete to start TASK MANAGER ,choose Service ,Then you will find MySQL, click that item by right click,then choose start, your MySQL Server will start!

answered Feb 9, 2018 at 7:49

NightWind's user avatar

In order to prevent ‘Access Denied‘ error:

Start -> search ‘Services-> right click -> Run as admistrator

armatita's user avatar

armatita

12.2k8 gold badges51 silver badges49 bronze badges

answered May 23, 2016 at 14:11

d3vnico's user avatar

Summary: in this tutorial, you will learn how to restart MySQL Server on Windows and Linux.

Restart MySQL Server on Windows

If MySQL installed as a Window service, you follow these steps to restart the MySQL Server:

First, open the Run window by using the Windows+R keyboard.

Second, type services.msc and press Enter:

Third, select the MySQL service and click the restart button.

Restart MySQL Server on Linux

You use the following command to restart the MySQL server On Linux:

service mysql restart

Code language: SQL (Structured Query Language) (sql)

If the name is MySQL service is mysqld not mysql, you need to change the service name in the command as shown in the following command:

service mysqld restart

Code language: SQL (Structured Query Language) (sql)

Or you can use the init.d to start the MySQL service:

/etc/init.d/mysqld restart

Code language: SQL (Structured Query Language) (sql)

In this tutorial, you have learned how to restart the MySQL server on Windows and Linux.

Was this tutorial helpful?

When using MySQL, there are times when it’s important to know how to start, stop, or restart your MySQL server. Luckily, there are multiple, easy ways to do this. Which methods are available to you however, will depend on the operating system your running.

Read on to learn how to start, stop, and restart MySQL server in both Linux and Windows.

How to Start, Stop, and Restart MySQL Server in Linux

If you need to stop or restart your MySQL server on a Linux system, there are three different commands that can be used:

  1. Depending on your Linux distribution, you can change the state of MySQL using the service command.

    • To start MySQL server:

      sudo service mysqld start
    • To stop MySQL server:

      sudo service mysqld stop
    • To restart MySQL server:

      sudo service mysqld restart
  2. If you don’t have the service command available or would prefer to make changes to MySQL using a different method, you can also use the init.d command to start/stop your MySQL server.

    • To start MySQL server:

      sudo /etc/init.d/mysqld start
    • To stop MySQL server:

      sudo /etc/init.d/mysqld stop
    • To restart MySQL server:

      sudo /etc/init.d/mysqld restart
  3. Lastly, you can also use the systemctl command to start, stop, and restart applications on Linux, including MySQL.

    • To start MySQL server:

      sudo systemctl start mysqld
    • To stop MySQL server:

      sudo systemctl stop mysqld
    • To restart MySQL server:

      sudo systemctl restart mysqld

How to Start, Stop, and Restart MySQL Server in Windows

If you’re trying to start, stop, or restart your MySQL server on a Windows-based system, you can do so easily from the command line. Just follow these 3 steps:

  1. To start, you’ll first need to open a terminal window. If you don’t have this somewhere easily accessible, you can find it quickly using the Windows’ Run dialog. To open the Run dialog, just press the Windows Key + R.
  2. Next, type in “cmd and press the Enter key. This will open a new terminal window.
  3. Once you’ve opened a terminal window, just type the following commands to start or stop MySQL server:

    • To start MySQL server:

      mysqld start
    • To stop MySQL server:

      mysqld stop

*Note: depending on which version of Windows you are running, you may need the specific name of the MySQL version number you are running in order to start or stop the service. To find this, go to the start menu and search for Services. Locate the version of MySQL you are using and try the following commands, replacing “##” with your version number:

net start MySQL##

net stop MySQL##

For instance, if you’re running MySQL 8.0, replace “MySQL##” with “MySQL80”.

And there you have it! You now have several different methods for starting, stopping, and restarting MySQL server as needed.

Popular Links

Looking for more information on MySQL? Search our Knowledge Base!

Interested in more articles about Databases? Navigate to our Categories page using the bar on the left or check out these popular articles:

  • View the Contents of a Table in a SQL Server Database Using Enterprise Manager
  • Create a MySQL Backup from Command Line – MySQL Import SQL File
  • How to Install SQL Server 2012 Express on Windows Server 2012

Popular tags within this category include: MySQL, MSSQL, phpMyAdmin, PostgreSQL, and more.

Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.

The Hivelocity Difference

Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.

With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.

Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

In this post, we are going to see how to start, stop, and restart MySQL Server on macOS, Linux, and Windows.

1. On Mac

You can start/stop/restart MySQL Server via the command line.

  • For the version of MySQL older than 5.7:
sudo /usr/local/mysql/support-files/mysql.server start
sudo /usr/local/mysql/support-files/mysql.server stop
sudo /usr/local/mysql/support-files/mysql.server restart
  • For the MySQL version 5.7 and newer:
sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist
  • Or you can turn it on/off via the macOS Preference Panel

MySQL Preference Panel


There’s another way which you can use DBngin, an free utility to install and manage multiple database servers on Mac.

  • To turn on/off, it’s just one click away from the server control panel:

DBngin local server


2. On Linux

  • On Linux start/stop from the command line:
/etc/init.d/mysqld start 
/etc/init.d/mysqld stop 
/etc/init.d/mysqld restart 
  • Some Linux flavours offer the service command too
service mysqld start 
service mysqld stop 
service mysqld restart
  • or
service mysql start
service mysql stop
service mysql restart

3. On Windows

  • Open Run Window by Winkey + R
  • Type services.msc
  • Search MySQL service based on version installed.
  • Click stop, start or restart the service option.

Or you can start/stop MySQL from the command prompt:

C:> "C:Program FilesMySQLMySQL Server 8.0binmysqld"
C:> "C:Program FilesMySQLMySQL Server 8.0binmysqladmin" -u root shutdown

Need a good GUI tool for MySQL on MacOS and Windows? TablePlus is a modern, native tool with an elegant GUI that allows you to simultaneously manage multiple databases such as MySQL, PostgreSQL, SQLite, Microsoft SQL Server and more.


Download TablePlus for Mac. It’s free anyway!

Not on Mac? Download TablePlus for Windows.

TablePlus GUI for MySQL

В этой статье мы расскажем, зачем нужна MySQL, как перезапустить MySQL (MySQL restart), а также как остановить и снова запустить её.

Данные сайта — это файлы на сервере, а база — место, где они хранятся. Данные могут принимать любой облик. Например, при создании интернет-магазина базу данных могут использовать для хранения каталога товаров.

MySQL – это одна из популярных систем баз данных, которая используется для обеспечения работы сайтов. В этой системе работа с базой данных происходит с помощью SQL (Structured Query Language) ― языка структурированных запросов. MySQL работает так же, как и обычные серверы. Одно устройство делает запрос с помощью SQL-команд, а второе отвечает.

Для взаимодействия с MySQL-сервером используются специальные утилиты. В большинстве современных ОС для управления базами данных используют утилиту Systemd. Для перезагрузки и остановки БД мы будем использовать именно её.

Перед работой:

  1. 1.

  2. 2.

    Авторизуйтесь в системе для получения прав root.

  3. 3.

    Проверьте состояние MySQL. Для этого введите:

    Перед вами появится подобный ответ:


    Состояние MySQL

Как сделать перезапуск MySQL

Введите команду:

Как сделать остановку MySQL

Остановка MySQL делается также при помощи утилиты Systemd.

Введите:

После остановки можно запустить сервер командой:

MySQL is an RDMS that runs as a service on operating systems like Linux, Ubuntu, Debian, Windows, etc. As a service, it can be started, stopped, or restarted. If there is a problem or major change in the MySQL database generally a restart is required. Also if there is an unresolved problem or performance problem generally restarting the MySQL database server is the best first step. In this tutorial, we examine how to restart the MySQL database server or service in different operating systems (Linux, Ubuntu, Debian, CentOS, Windows) using different methods.

Check Status of MySQL Database Server In Linux (Ubuntu, Debian, CentOS)

Before restarting the MySQL database server checking its status is beneficial. In Linux, there are a lot of ways to check the status of the MySQL database server whether it is running or stopped. But the most popular and compatible command is systemctl which can be used to check the status of the MySQL database server or service. The MySQL database service is named as mysqld for service name.

$ systemctl status mysqld
Check Status of MySQL Database Server In Linux (Ubuntu, Debian, CentOS)

Alternatively the init.d scripts can be used to check MySQL database service status like below.

$ /etc/init.d/mysql status

Restart MySQL Database Server In Linux (Ubuntu, Debian, CentOS)

The systemctl command can be used to restart the MySQL database service. The restart first stops the service and then starts it with a single command. The systemctl restart command can be used to restart the MySQL database service. The MySQL database service is named as mysqld which is the short form of “MySQL Daemon”. As restarting a service is an administrative task it requires administrative privileges which can be provided as root or running with sudo command like below.

$ sudo systemctl restart mysqld

The sudo command may requires the password for the current user with the following prompt.

[sudo] password for ismail:

After the restart, the status of the MySQL database service status can be checked if it is started properly.

Check Status of MySQL Database Server In Windows

The status of the MySQL database service can be check-in Windows by using the Services. The Services configuration can be opened via the Windows Run. First, we open the Windows Run with the WIN+R keyboard shortcuts. Then put services.msc command into Windows Run and execute it.

services.msc
Open Services

In the Services navigate to the MySQL service which is like below. The status of the service is listed as Running .

Check MySQL Database Service Status In Windows

Restart MySQL Database Server In Windows

The MySQL database service can be restarted in different ways from command line interface or Services configuration. First the MS-DOS command line interface can be used to restart MySQL database service in Windows.

"C:Program FilesMySQLMySQL Server 8.0binmysqladmin" -u root shutdown
"C:Program FilesMySQLMySQL Server 8.0binmysqld"

Alternative way is using the Services which is the official service mangement method for Windows operating systems. First we open the services screen via Windows Run by executing the services.msc like below.

Open Services In Windows

In the Services configuration screen navigate to the MySQL service and select it. The Restart button or text can be used to restart MySQL service like below.

Check Status of MySQL Database Server In MacOSX

The MySQL database service or server status can be checked in MacOSX operating systems similar to the Linux operating system. If the installed version of the MySQL database server is older than 5.7 the following instructions can be used to check MySQL service status via the command-line interface.

$ sudo /usr/local/mysql/support-files/mysql.server status

If the installed MySQL database service version is higher then 5.7 the following commands can be used to check status.

sudo launchctl status -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

The MySQL database service can be restarted using the following commands in MacOSX operating system.

sudo /usr/local/mysql/support-files/mysql.server restart

Понравилась статья? Поделить с друзьями:
  • Как перезапустить ноутбук в безопасном режиме windows 10
  • Как перезагрузить яндекс браузер на компьютере без потери данных windows 7
  • Как перезапустить рабочий стол windows 10 через диспетчер задач
  • Как перезапустить нижнюю панель в windows 10
  • Как перезагрузить центр обновления windows 10