Linux, Web Server & Database

Reset MySQL User Password

Reset a forgotten or compromised MySQL/MariaDB user password, including root if needed.

The Problem

You've lost or forgotten a database password — sometimes even the root password — and need access restored without losing any data in the process.

About this problem

Resetting a regular MySQL user's password is usually trivial if you already have another account with sufficient privileges, but losing the root password specifically requires a more careful recovery process involving restarting MySQL in a special safe mode, since by design there's no simple 'forgot password' link for a database server.

This comes up after a staff change, a forgotten credential that was never documented, or suspicion that a password may have been exposed somewhere and needs rotating.

What's Included

What's NOT Included

How It Works

  1. For a regular user, connect with an account that has sufficient privileges and run ALTER USER or SET PASSWORD for the affected account.
  2. For a lost root password, stop MySQL, restart it with --skip-grant-tables in a controlled, brief window, and reset the root password through that safe-mode access.
  3. Restart MySQL normally afterwards and confirm the new root (or user) password works correctly.
  4. Update any application config files, environment variables or connection strings that reference the old password.
  5. Test each affected application's connection with the new credentials to confirm everything reconnects properly.

In practice: you buy the service, send over whatever access or details the job needs, I investigate and do the work, and you confirm it's resolved before we call it done.

Frequently Asked Questions

What do I do if I forgot my MySQL root password?
It requires restarting MySQL in a special safe mode (skip-grant-tables) briefly to reset it directly, since there's no simple recovery email or reset link for a database server.
Will resetting a MySQL password cause downtime?
Resetting a regular user's password doesn't require any downtime; resetting the root password via safe mode does require briefly restarting the MySQL service.
Do I need to update my application after resetting a database password?
Yes — anywhere that password is stored (config files, environment variables, connection strings) needs updating to match, or the application will fail to connect with the old credentials.
How often should I rotate database passwords?
There's no universal rule, but rotating after any staff change, suspected exposure, or as part of periodic security hygiene is generally good practice.
Can I reset a MySQL password without SSH access to the server?
Not for a root password recovery specifically, since that process requires direct access to restart the MySQL service — a regular user's password can sometimes be reset via a hosting control panel instead.
Is it risky to use safe mode to reset the root password?
It's a well-established, standard recovery procedure when done correctly and briefly, though it does mean the database is temporarily running without its normal access controls during that window.
Please note: the price shown applies to a standard case matching the description above. Every situation is different, and if your request falls outside the normal scope of this service, I will explain this before doing any additional chargeable work. I will never silently turn a small job into an expensive project.
Running into an issue with a service you've already bought, or unsure which one fits your problem? Message me directly on WhatsApp — no ticket system, no bot.