Databases 4 min read

How to Fix MySQL Service Crash After Password Prompt: Step‑by‑Step Guide

This guide explains why MySQL may crash after entering the password on Windows, shows how to verify the service status, and provides three concrete methods—including command‑line fixes and my.ini adjustments—to restore normal operation.

ITPUB
ITPUB
ITPUB
How to Fix MySQL Service Crash After Password Prompt: Step‑by‑Step Guide

Recently a MySQL server on Windows started crashing immediately after the password prompt, preventing users from logging in. The most common causes are the MySQL service not running or misconfigured settings in the MySQL configuration file.

Check and Start the MySQL Service

First open the Windows Services management console (Control Panel → Administrative Tools → Services). Locate the MySQL service and verify its status.

If the service is stopped, right‑click it and choose Start . After the service starts, retry logging in; the crash should be resolved.

When the Service Is Already Running

If the service is running but the crash persists, the problem likely lies in the MySQL configuration file ( my.ini) located in the installation directory (e.g., C:\Program Files\MySQL\MySQL Server X.X\my.ini).

Method 1: Start MySQL with Skip Grant Tables

Open a command prompt, navigate to the MySQL bin directory, and run: mysqld-nt --skip-grant-tables Leave this window open, open another command prompt, and log in with the MySQL Command Line Client using the correct password.

Method 2: Use the MySQL Client Directly

Press Win+R, type cmd, and change to the MySQL bin folder. Then execute: mysql -u root -p Enter the password when prompted; this bypasses the service crash.

Method 3: Edit the Configuration File

If the error message mentions unknown variable 'character-set-server=gbk', edit my.ini and comment out or delete the line default-character-set=gbk. Save the file and restart the MySQL service.

Conclusion

By ensuring the MySQL service is running or correcting the configuration file, the password‑prompt crash can be resolved quickly. The three methods above cover most scenarios encountered on Windows systems.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

mysqlWindowsmy.iniservice crash
ITPUB
Written by

ITPUB

Official ITPUB account sharing technical insights, community news, and exciting events.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.