The_Unobsequious
The_Unobsequious

Reputation: 307

Unable to start MySQL server

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.

Upvotes: 27

Views: 286779

Answers (20)

Devanand Sharma
Devanand Sharma

Reputation: 196

In my case MySQL service was not installed i.e., MySQL was not installed fully.

  1. Run the MySQL installer again.
  2. Click Reconfigure it.
  3. Select Legacy Authentication method.
  4. Enter new passwords.
  5. MySQL will be installed along with MySQL service.
  6. Open Command Line for MySQL client and enter password, MySQL will be working fine.

Upvotes: 0

Tugalsan Karabacak
Tugalsan Karabacak

Reputation: 633

It happended to me when I try to create a server like this:

SC CREATE mariadb_3360 DisplayName=mariadb_3360 start=auto binpath="d:/bin/mariadb/home/bin/mysqld --defaults-file=d:/bin/mariadb/my.ini"

It is supposed to be like this (attention to last element)

SC CREATE mariadb_3360 DisplayName=mariadb_3360 start=auto binpath="d:/bin/mariadb/home/bin/mysqld --defaults-file=d:/bin/mariadb/my.ini mariadb_3360"

Upvotes: 0

Pavan Bashetty
Pavan Bashetty

Reputation: 21

Open MySQL workbench -> Open an instance -> Click on Server [in the top ribbon] -> Startup/Shutdown ->Click on start server

This worked for me

Upvotes: 0

Pikamander2
Pikamander2

Reputation: 8299

While not the most straightforward method, I was able to resolve this issue by:

  • Attempting to upgrade MySQL Server via the MySQL Community Installer, which failed and gave me this error message: Multiple files found for the same tablespace ID: Tablespace ID: 948 = ['database1\table1.ibd', 'database2\table2.ibd']

  • Navigating to my data folder and deleting one of the two databases that had the duplicate tablespace ID (after taking a backup).

I'm not sure how the issue arose to begin with, but after deleting the file, the MySQL service went back to launching without any issues.

Upvotes: 0

ahm
ahm

Reputation: 125

in my case, mysql unable to start and running is because you have more than one software apache. so you have to stop you apache2 with this code:

`sudo service apache2 stop `

when you already stop apache2, you can run again you mysql. hopefully it will help you

Upvotes: -2

Karishma
Karishma

Reputation: 17

i had the same mysql issue try to change the port and then restart xampp server if issue is not sloved then restart your PC that sloved my issue

Upvotes: 0

J Maine
J Maine

Reputation: 23

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.

Upvotes: 0

User
User

Reputation: 1618

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.

Upvotes: 1

thiagosteps227
thiagosteps227

Reputation: 46

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.

Upvotes: 0

Fawaz Aljohani
Fawaz Aljohani

Reputation: 105

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

Upvotes: 0

dhaivat joshi
dhaivat joshi

Reputation: 171

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.

Upvotes: 16

MemeyMcMemeFace
MemeyMcMemeFace

Reputation: 71

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

Upvotes: 7

Poorna
Poorna

Reputation: 199

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

Upvotes: 0

Fridtjof Koene
Fridtjof Koene

Reputation: 1

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"

Upvotes: 0

sgirardin
sgirardin

Reputation: 448

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

Upvotes: 1

Wandile Nxumalo
Wandile Nxumalo

Reputation: 15

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

Upvotes: 0

Venkat
Venkat

Reputation: 157


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.

Upvotes: 1

Besan Vadim
Besan Vadim

Reputation: 441

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

Upvotes: 29

Matt
Matt

Reputation: 111

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.

Upvotes: 6

Aakash
Aakash

Reputation: 1900

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.

Upvotes: 13

Related Questions