Mysql command line не запускается на windows

I just installed the latest version of MySQL. Until Now I had it on Windows XP but I wanted to install this on another computer with Windows 7. Even after configuring everything correctly, the MySQL

Heyoo Heyoo. So as of today 19th March 2022 I had this same issue but imma show you how I solved it. My specs before we start:

  • MySql Version: 8.0
  • OS: Windows 10
  • OS Build: 19044.1586

Alright, I’m fairly new to SQL, was following along with a tutorial but when it got to the point of opening the client command line it wouldn’t open, it just popped up and closed back; didn’t even ask for a password. After watching several tutorials (which were very unhelpful) I noticed from those tutorials that the solution they proffered was to «Active the MYSQL80 service», but that was unhelpful to me because I couldn’t see that service in the services menu.

So I decided to go back to the «MySql Installer -Community» App (I installed the community version of SQL)

enter image description here

After the installer had opened up I clicked on the «Reconfigure» action for MySQL Server

enter image description here

It opened the configuration window for the SQL Server and I followed the configuration process to set up the server (turns out I didn’t initially set it up when I installed MySQL 😅😅). After the configuration process was done I went back to the services menu to see if the «MYSQL80» service was there… and it was, I checked to see if it was running; following the instructions from this tutorial. After making sure the service was running I went back to the client command line, it finally opened up, allowed me to input my password, and it’s working properly!!

Skip to content

MySQL is one of the popular and open-source Relational databases available in the market. And it supports connectivity for all popular programming languages including C++, JAVA, and C#.

We can install the MySQL server on our machine by simply downloading the setup binaries from the official site and installing it just like we install any other software. While installing setup will prompt you for the root password for the security of the database access.

MySQL command line client

After installing it successfully, you can now create and manage the MySQL database by opening the MySQL command-line client. But I found many users on the internet that are complaining about MySQL command-line client crashes after they typed the ‘correct’ root password.

Some days ago my machine also ran into the same problem. When I started to look into it in order to fix the issue, I found the main root cause of it. The problem was the MySQL service was disabled somehow in the background. That’s why although we typed the correct password, the MySQL command-line client was not able to contact its service to give access to the MySQL shell and because of that, it was crashing again and again. So if you are facing the same issue then this post is meant for you. Following are the simple steps that you should follow in order to fix the issue. So let’s get started…….

Steps

  1. Press the Windows logo key + R simultaneously to open the ‘Run’ dialog box
  2. In the ‘Run’ dialog box type services.msc and hit enter to open the Services window. Services.msc
  3. In the services window, search for MySQL57 service and double click on it to open.MySQL service
  4. You will notice that the service is either disabled (in startup type) or stopped in service status.
  5. Select Automatic or Automatic (Delayed start) in the select box of Startup type and click on apply. So that whenever your machine starts the MySQL service will start automatically in the background.Screenshot (88)
  6. After that click on Start button to start the MySQL service on your machine. It will take some few seconds to start (wait is worth). Then click on apply and hit Ok. Then close the services window also.Screenshot (89)

Now try to open MySQL command-line client, enter the correct root password when prompted and hit enter. The MySQL shell will start without any issues and you will be able to manage your databases.

How to – Check MySQL service status

You can also check whether the MySQL service is running in the background or not. To do that open Task manager ( Press CTRL + SHIFT + ESC  simultaneously ) and look for mysqld service in the background process section. If it isn’t listed there then the service is stopped or disabled. You have to follow the same previous step to start it again.

Task manager MySQL service

So in this way, we can fix the crashing issue my MySQL command line client. The above steps are applicable to Windows 10/8.1/8/7. If you face any problem while performing steps make sure you hit a comment in the comment section below.

Cheers…

Whenever I write the command «C:Program FilesMySQLMySQL Server 5.0binmysqld» the command prompt hits back with something like this:

C:>"C:Program FilesMySQLMySQL Server 5.5binmysqld"

141110 3:12:58 [Warning] Can’t create test file C:Program FilesMySQLMySQL Server 5.5dataDutta.lower-test
141110 3:12:58 [Warning] Can’t create test file C:Program FilesMySQLMySQL Server 5.5dataDutta.lower-test
141110 3:12:58 [Note] Plugin ‘FEDERATED’ is disabled.
141110 3:12:58 InnoDB: The InnoDB memory heap is disabled
141110 3:12:58 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141110 3:12:58 InnoDB: Compressed tables use zlib 1.2.3
141110 3:12:58 InnoDB: Initializing buffer pool, size = 128.0M
141110 3:12:58 InnoDB: Completed initialization of buffer pool
141110 3:12:58 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.

I’m just a beginner. May be a silly mistake. Sorry in advance !!

asked Nov 9, 2014 at 21:39

Plabon Dutta's user avatar

Plabon DuttaPlabon Dutta

6,5393 gold badges29 silver badges32 bronze badges

2

I think I got it. I had the exact same problem and actually ended up uninstalling and reinstalling a couple of times; until…

start> CMD> c:Program FilesMySQL Server 5.7bin> mysql -u root -p

Hope its as simple for u too. I kinda laughed when I noticed.

answered Jun 14, 2016 at 4:51

borregs's user avatar

1

The context and privileges of the current user will take affect when you manually start the executable in this way.

You either need to make sure:

  1. The current user has the correct permissions to all files and directories required
  2. You elevate permissions of the command prompt to run as an administrator

If you have the MySQL service installed you can also use net start MySQL.

This page of the MySQL manual contains useful information for installing and running the MySQL server on windows.

Please remember that once you have ‘started’ the MySQL service (or service) you won’t actually see anything, you will then need to use a MySQL client application to connect to the server and interact.

Community's user avatar

answered Nov 9, 2014 at 22:25

Steve's user avatar

SteveSteve

3,6171 gold badge19 silver badges24 bronze badges

4

I’m posting this answer in case it solves it for some people.
All I had to do was to:

  1. Open task manager
  2. Open Services tab
  3. Find MySQL80 service and start it.

then just start the MySQL workbench and refresh the schemas.

answered Aug 11, 2021 at 5:59

Mohammad Alavi's user avatar

Mohammad AlaviMohammad Alavi

5081 gold badge4 silver badges8 bronze badges

Whenever I write the command «C:Program FilesMySQLMySQL Server 5.0binmysqld» the command prompt hits back with something like this:

C:>"C:Program FilesMySQLMySQL Server 5.5binmysqld"

141110 3:12:58 [Warning] Can’t create test file C:Program FilesMySQLMySQL Server 5.5dataDutta.lower-test
141110 3:12:58 [Warning] Can’t create test file C:Program FilesMySQLMySQL Server 5.5dataDutta.lower-test
141110 3:12:58 [Note] Plugin ‘FEDERATED’ is disabled.
141110 3:12:58 InnoDB: The InnoDB memory heap is disabled
141110 3:12:58 InnoDB: Mutexes and rw_locks use Windows interlocked functions
141110 3:12:58 InnoDB: Compressed tables use zlib 1.2.3
141110 3:12:58 InnoDB: Initializing buffer pool, size = 128.0M
141110 3:12:58 InnoDB: Completed initialization of buffer pool
141110 3:12:58 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .ibdata1
InnoDB: File operation call: ‘create’.
InnoDB: Cannot continue operation.

I’m just a beginner. May be a silly mistake. Sorry in advance !!

asked Nov 9, 2014 at 21:39

Plabon Dutta's user avatar

Plabon DuttaPlabon Dutta

6,5393 gold badges29 silver badges32 bronze badges

2

I think I got it. I had the exact same problem and actually ended up uninstalling and reinstalling a couple of times; until…

start> CMD> c:Program FilesMySQL Server 5.7bin> mysql -u root -p

Hope its as simple for u too. I kinda laughed when I noticed.

answered Jun 14, 2016 at 4:51

borregs's user avatar

1

The context and privileges of the current user will take affect when you manually start the executable in this way.

You either need to make sure:

  1. The current user has the correct permissions to all files and directories required
  2. You elevate permissions of the command prompt to run as an administrator

If you have the MySQL service installed you can also use net start MySQL.

This page of the MySQL manual contains useful information for installing and running the MySQL server on windows.

Please remember that once you have ‘started’ the MySQL service (or service) you won’t actually see anything, you will then need to use a MySQL client application to connect to the server and interact.

Community's user avatar

answered Nov 9, 2014 at 22:25

Steve's user avatar

SteveSteve

3,6171 gold badge19 silver badges24 bronze badges

4

I’m posting this answer in case it solves it for some people.
All I had to do was to:

  1. Open task manager
  2. Open Services tab
  3. Find MySQL80 service and start it.

then just start the MySQL workbench and refresh the schemas.

answered Aug 11, 2021 at 5:59

Mohammad Alavi's user avatar

Mohammad AlaviMohammad Alavi

5081 gold badge4 silver badges8 bronze badges

#1 24.03.2007 11:33:15

McDoom
Участник
Зарегистрирован: 24.03.2007
Сообщений: 2

Проблемы с запуском командной строки

Установил MySQL 5.0.27 под Windows XP Professional. Сразу после установки командная строка запускается и работает без проблем. Но после перезагрузки компьютера пытаюсь запустить ее же, ввожу пароль, а комп издает звук beep и закрывает окно. Помогите советом. Спасибо.

Неактивен

#2 24.03.2007 12:44:29

rgbeast
Администратор
MySQL Authorized Developer and DBA
Откуда: Москва
Зарегистрирован: 21.01.2007
Сообщений: 3874

Re: Проблемы с запуском командной строки

Вероятно, сервис MySQL не запускается автоматически при загрузке машины. Вам нужно найти сервис mysql в управлении сервисами в Windows (простой путь: клик правой кнопкой мыши на иконке Мой компьютер, в выпадающем меню выбрать «Управление», в появившемся окне, выбрать «Сервисы»), запустить сервис и установить его автоматический запуск (Пункт: загрузка, варианты: автоматически и вручную).

Если сервис запущен, то консоль должна работать.

Неактивен

#3 24.03.2007 16:40:14

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6740

Re: Проблемы с запуском командной строки

Для того, чтобы определить точную ошибку, попробуйте запустить консоль
отдельно от клиента mysql. Тогда клиент, написав ошибку, консоль не закроет,
и Вы сможете описание этой ошибки прочитать:

1. Запустить консоль: Пуск -> Выполнить -> «cmd».
2. Перейти в каталог MySQL: cd «Program FilesMySQL Server 5.0bin»
3. Запустить клиент: mysql -u root -p

Чаще всего ошибка оказывается не в запуске сервиса (который запускается
автоматически), а в написании имени пользователя и пароля.

Неактивен

#4 26.03.2007 10:49:43

McDoom
Участник
Зарегистрирован: 24.03.2007
Сообщений: 2

Re: Проблемы с запуском командной строки

Спасибо! Действительно, был выставлен ручной запуск сервиса. Все работает!

Неактивен

#5 21.04.2011 19:17:31

Michael17
Участник
Зарегистрирован: 21.04.2011
Сообщений: 2

Re: Проблемы с запуском командной строки

Помогите!!!
——————
Я указал путь к директории bin , ввожу
mysql -u root
(у меня без пароля)
выдает ошибку mysql: Character set ‘cp1251’ is not a compiled character set and is not specified in the ‘Cmysql\sharecharsetsIndex.xml’ file

Неактивен

#6 21.04.2011 22:01:01

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6740

Re: Проблемы с запуском командной строки

А зачем Вы поднимаете тему 2007 года? sad(

Смотрите в my.ini, у Вас там битый путь прописан к файлу кодировок.

Неактивен

#7 23.04.2011 14:54:08

Michael17
Участник
Зарегистрирован: 21.04.2011
Сообщений: 2

Re: Проблемы с запуском командной строки

Ну, извините что в тему 2007 написал, но все же. Что надо сделать, а то я вообще ни бум-бум в MySQL

Неактивен

#8 25.04.2011 20:07:42

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6740

Re: Проблемы с запуском командной строки

Э… «Смотрите в my.ini, у Вас там битый путь прописан к файлу кодировок.» big_smile

Неактивен

Like this post? Please share to your friends:
  • Mysql client скачать для windows 10
  • Mysql 2000 скачать на windows 10
  • Mypublicwifi скачать бесплатно на русском языке для windows 7
  • Mypublicwifi не работает на windows 10
  • Mypublicwifi как настроить на windows 10