MySQL is installed on Windows but there is no MySQL service
NET START MySQL fails because no service named MySQL existsShort answer
A Windows MySQL service exists only after mysqld --install registers it. An install done by hand, without the configurator, can leave you with no service. Run the command from an administrator prompt with the full path, then start the service. If a service exists under another name, look for it in the Services utility and use that name.
Fix it fast
1Find out which cause you have
Open the Services utility and look for any MySQL entry, whatever it is called. Then check that the server program is on disk.
dir "C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld.exe" NET START MySQL2Match what you see, then jump to its fix
- 1
Services has no MySQL entry, and mysqld.exe existsThe service was never installedFix - 2
Services shows a MySQL-related entry whose name is not MySQLThe service exists under a different nameFix - 3
Access is denied, or the install command printed an error and no service appearedThe install or start was done without administrator rightsFix
- 1
What does the error look like?
NET START MySQL fails because no service named MySQL existsMySQL does not appear in the Services utility
Cause 1 of 3
The service was never installed
1Check
A service exists only after mysqld --install has registered it, and that command does not start the server.
"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld" --version2Fix
From a command prompt opened as administrator, install the service, then start it. Use --install-manual if Windows should not start it at boot.
"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld" --install
NET START MySQL3Verify
The start command reports success.
NET START MySQLConfirmed by dev.mysql.com
Cause 2 of 3
The service exists under a different name
1Check
The default service name is MySQL, but a different name can be given right after --install. Read the name in the Services utility.
# Services utility: note the Service name of the MySQL entry2Fix
Use the real name in the start command. When you install with your own name and options, put --install first, or mysqld.exe tries to start the server instead.
NET START MySQL84
"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld" --install MySQL --defaults-file=C:\my-opts.cnf3Verify
The command reports that the service started.
NET START MySQL84Confirmed by dev.mysql.com
Cause 3 of 3
The install or start was done without administrator rights
1Check
Installing a service needs an account with administrator rights. Close the Services utility while installing or removing from the command line, to avoid conflicts.
# Title bar of the prompt should read Administrator2Fix
Open the command prompt with Run as administrator, close Services, and repeat the install.
"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld" --remove
"C:\Program Files\MySQL\MySQL Server 8.4\bin\mysqld" --install3Verify
Start the service and read the status.
NET START MySQLConfirmed by dev.mysql.com
How do I stop it coming back?
- Write down the service name you chose, and use it in scripts.
- Check the .err file in the data directory first when the service installs but will not start.
- Update any script that holds the full path to mysqld.exe when you move to a new version.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- TaxiDexMy own multi-tenant taxi dispatch SaaS: API, dispatcher portal, driver and passenger apps, and the servers underneath.
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- ShopGoAn e-commerce aggregator with a Python scraping engine behind its catalog, past 10K Google Play downloads.
Related fixes
Databases
Installing the Airflow MySQL provider fails on pkg-config or mysqlclient
Building the mysqlclient wheel fails during the install
The Airflow MySQL provider depends on mysqlclient, which pip compiles against the MySQL C client library.
2 causes, each with a fixDatabases
A query on Aurora MySQL dies with 'table /rdsdbdata/tmp/#sql... is full'
ERROR 1114 (HY000): The table '/rdsdbdata/tmp/#sqlfd_1586_2' is full
In Aurora MySQL 3, internal temporary tables share one pool, and when that pool and the memory-mapped overflow file are used up, a reader instance ends the query with error 1114.
3 causes, each with a fixDatabases
Azure Database for MySQL refuses a connection that does not use SSL
ERROR 3159 (HY000): Connections using insecure transport are prohibited while --require_secure_transport=ON.
Azure Database for MySQL Flexible Server requires encrypted connections by default (require_secure_transport = ON, TLS 1.2).
4 causes, each with a fixDatabases
Compiling a C or C++ program that includes mysql.h fails
undefined reference to `mysql_init'
The compiler only finds mysql.h when the MySQL client development files are installed and their folder is on the include path.
3 causes, each with a fixDatabases
DBeaver fails to resolve Maven dependencies when downloading a database driver
A driver library does not download automatically
DBeaver downloads driver jars from a Maven repository.
3 causes, each with a fixDatabases
DBeaver cannot verify the MySQL server certificate
unable to find valid certification path to requested target
DBeaver's MySQL driver is checking the server certificate and Java does not trust the CA that signed it.
2 causes, each with a fix