FG
šŸ’» Software

I believe I've deleted MySQL root user, how do I recreate it?

Fresh5 days ago
Mar 15, 20264974 views
Confidence Score0%
0%

Problem

I'm running ISPConfig on CentOS and I don't know how, but I don't seem to have a root mysql user. I can stop mysqld with Start it again and skip grant tables I see 4 users I had previously created but no root user. I tried putting this in a file /root/rootreset.sql. And starting with that file It l…

Error Output

/etc/init.d/mysqld stop

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: I believe I've deleted MySQL root user, how do I recreate it?

Low Risk

I followed these instructions and my root user is now listed in the user table and I can login with it. What seemed to do it was performing these steps as the mysql user rather than root.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment