15

Running Windows 7 64-bit.

I've been unable to start an instance of MySQL 5.6 server. When I attempt to start it from within the MySQL workbench, I get this:

2013-11-23 14:05:07 - Checking service status of instance MySQL...
2013-11-23 14:05:07 - Status check of service 'MySQL' returned stopped

I've tried manually starting the Windows service. Following advice that worked for others with the same problem, I've configured the service to log on as "Local System account". No dice; it throws this:

error 1053: the service did not respond to the start or control request in a timely fashion

I've also tried disabling my firewall, and completely reinstalling MySQL server.

It should perhaps be noted that (I assume as a result of all this) I also cannot log into the MySQL command line client. It tells me:

Can't connect to MySQL server on 'localhost' (10061)

This is my first time trying to set up a MySQL server, so perhaps there's just something I've missed. If so, I'm unsure what it is.

S.L. Barth
  • 7,954
  • 71
  • 47
  • 62
The_Unobsequious
  • 187
  • 1
  • 1
  • 10

14 Answers14

27

I had the same issue. Try this, it should work!

  1. Right click on MySQL Notifier -> Actions -> Manage Monitored Items

  2. Highlight the MySQL56 entry and click the delete button

  3. Click the add button -> windows service
  4. Scroll down and look for MySQL56
  5. Highlight it and click ok
Besan Vadim
  • 421
  • 4
  • 7
8

Try manually start the service from Windows services, Start -> cmd.exe -> services.msc. Also try to configure the MySQL server to run on another port and try starting it again. Change the my.ini file to change the port number.

Aakash Goyal
  • 1,789
  • 17
  • 28
  • 1
    Neither of these fixed the issue. It should be noted that the my.ini includes this comment: # *** DO NOT EDIT THIS FILE. It's a template which will be copied to the # *** default location during install, and will be replaced if you # *** upgrade to a newer version of MySQL. I tried uncommenting the port line and designating a port. Would there be a different copy in the "default location"? If so, where might this be? I would expect this only to be copied if I was successfully able to set up the server. – The_Unobsequious Nov 23 '13 at 19:51
  • Check this, it specifies the locations for files...http://dev.mysql.com/doc/refman/5.1/en/option-files.html, by default the name would be my-default.ini. – Aakash Goyal Nov 23 '13 at 19:57
  • Also had my-default.ini. Tried changing it as well--did not fix. The reason I had both is because the MySQL command line client wouldn't even launch without my.ini, so I copied my-default.ini and renamed it, which allowed the client to launch. – The_Unobsequious Nov 23 '13 at 20:02
  • Try to do this using the Instance Configuration Wizard. It will recreate the ini file with the config that you specify. – Aakash Goyal Nov 23 '13 at 20:24
  • You can check if the port is being used or not [see this answer](https://stackoverflow.com/a/23718720/318807) – AJ Dhaliwal May 16 '19 at 10:58
5

You should start by checking the error log and/or the startup message log when managing the instance using MySQL Workbench. There could be clues as to what is going wrong, which may be different than this scenario.

When I had this issue, it was because I used a space in the service name during installation. While it is technically valid, you should not do that. It seems that the MySQL Installer (and MySQL Notifier) does not put the name in quotes which causes it to use an incorrect service name later on. There are two ways to fix the problem (all commands should be run from an elevated command prompt).

Reinstall the server

The first is to simply reinstall MySQL Server 5.6 using the default, no-space service name MySQL56.

The installer uses the same value for the service name and service display name. The name that I had originally specified was for a display name, when it should have been a simple service name. After installation, if you so choose, the display name can safely be changed to use spaces and other characters by using:

sc config MySQL56 DisplayName= "MySQL 5.6"

Recreate the service

If you don't want to reinstall the server however, you will have to recreate the service. Start by removing the old service:

mysqld --remove "service_name"

Now install the replacement. You can use --install to create a service that starts with the system automatically, or --install-manual to create a service that requires you to start it.

mysqld --install-manual "service_name" --local-service --defaults-file="C:\path\to\mysql\my.ini"

This creates a service that runs as the LocalService account which presents anonymous credentials on the network however. Under most circumstances this is fine, but if you want to use the NetworkService account (which is what the installer creates the service as) you can change it using the Services administrative tool.

Matt
  • 101
  • 1
  • 4
  • I had to combine this answer with [this answer](https://stackoverflow.com/a/38960953/7032856). In order to have the service up and running. – Nae May 19 '20 at 21:29
1

Keep dump/backup of all databases.This is not 100% reliable process. Manual backup: Go to datadir path (see in my.ini file) and copy all databases.sql files from data folder


This error will be thrown when unexpectedly MySql service is stopped or disabled and not able to restart in the Services.

First try restart PC and MySql Service couple of times ,if still getting same error then follow the steps.

Keep open the following wizards and folders:

  • C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin

  • C:\Program Files (x86)\MySQL\MySQL Server 5.5

Services list ->select MySql Service.

  1. Go to installed folder MySql, double-click on instance config C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\MySqlInstanceConfig.exe

Then select remove instance and click on next to remove non-working MySql service instance. See in the Service list (refresh F5) where MySql service should not be found.

  1. Now go to C:\Program Files (x86)\MySQL\MySQL Server 5.5 open my.ini file check below

#Path to installation directory

basedir="C:/Program Files (x86)/MySQL/MySQL Server 5.5/"

#Path to data directory

datadir="C:/ProgramData/MySQL/MySQL Server 5.5/Data/"

  1. Choose data dir Go to "C:/ProgramData/MySQL/MySQL Server 5.5/Data/" It contains all tables data and log info, ib data, user.err,user.pid . Delete

    • log files,
    • ib data,
    • user.err,
    • user.pid files.

(why because to create new MySql instance or when reconfiguring MySql service by clicking on MySqlInstanceConfig.exe and selecting default configure, after enter choosing password and clicking on execute the wizard will try to create these log files or will try to append the text again to these log files and other files which will make the setup wizard as unresponding and finally end up with configuration not done).

  1. After deleted selected files from C:/ProgramData/MySQL/MySQL Server 5.5/Data/ go to C:\Program Files (x86)\MySQL\MySQL Server 5.5

Delete the selected files my.ini and and other .bak format files which cause for the instance config.exe un-responding.

  1. C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin\MySqlInstanceConfig.exe Select MySqlInstanceConfig.exe and double-click on it and select default configuration or do the regular set up that we do when installing MySql server first time.
Venkat
  • 117
  • 3
1

If like me you had installed a MySQL on your server (Windows 2012), and when reinstalling the installer is unable to start the MySQL service. Then you have to completely erase MySQL! I had to do the following steps to be sure :

  1. Uninstall MySQL like any any software through the Control Panel -> Uninstall a Program
  2. Be sure to erase the MySQL folder where you installed it.
  3. Here is the trick (at least for me), you have to erase the C:\ProgramData\MySQL directory. Even if's not visible through the User Interface, enter the address in the windows explorer and you will find it! You will lose all the previous databases and users.
  4. Restart your OS
  5. When restarted check if the MySQL service is no more present the Windows Services (search for services in windows).
  6. Be sure no services that use MySQL (application needing access to MySQL) are active
  7. Resinstall MySQL and the service will be able to install itself again.

Got my info from the following blog :http://blogs.iis.net/rickbarber/completely-uninstall-mysql-from-windows

sgirardin
  • 378
  • 3
  • 12
1

Go to MySQL installer and click Reconfigure (don't change any existing settings). This should start the server and you'll be off.

1

Go to services and check whether the MySql is there. If not

    Start cmd in administrator mode
    Go to the "C:\Program Files\MySQL\MySQL Server X.X\bin"
    type mysqld --install

You may need to execute mysqld --initialize as well.

then start MySql in service window.

0

Mine did not start because the Server did not accept the 'Dedicated MySQL Server' setting in the Configuration.

0

See this post https://bugs.mysql.com/bug.php?id=67917 Sometimes a temp directory is missing. I had the same error like "InnoDB: Error: unable to create temporary file; errno: 2"

  • 1
    Please add contextual information rather than just providing a link. Links can disappear making your answer less useful. – user3486184 Nov 09 '17 at 19:59
0

I solved it by open a command prompt as an administrator and point to mysql folder -> bin -> mysql.exe. it works

Poorna
  • 131
  • 1
  • 3
0

I had faced the same problem a few days ago.

I found the solution.

  1. control panel
  2. open administrative tool
  3. services
  4. find mysql80
  5. start the service

also, check the username and password.

rimonmostafiz
  • 1,041
  • 1
  • 13
  • 28
0

In my case I had to go to the MySQL installer, then configuration button for the MySQL server, then next until the option to "create the server as a windows service" ticked that, gave it a service name as MySQL8.0, next and then finish, that solved the issue and started a new service

0

In my case, I went for

MySQL install Uninstall only the MySQL Server Install again

Make sure the Path is the same for example (if your installer warns you of a conflict): C:\Program Files...etc... C:\Program Files...etc...

If they are the same, it should work fine.

0

On my windows 10,

  1. Stop the configuration
  2. locate my.ini from C:\ProgramData\MySQL\MySQL Server 8.0\ and uncomment from the 'basedir' from the following:

Path to installation directory. All paths are usually resolved relative to this.

basedir="C:/Program Files/MySQL/MySQL Server 8.0/"

  1. Rerun the installation again.

Worked for me.

J Maine
  • 11
  • 3