# Need to reset the database username or create a new database

**URL:** <https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074>\
**Category:** Support\
**Tags:** windows-11\
**Created:** [April 12, 2026, 12:46am UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074 "2026-04-12T00:46:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Learn](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@Learn](https://community.localwp.com/u/Learn)\
**Post date:** [April 12, 2026, 12:46am UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/1 "2026-04-12T00:46:27Z")

</div>

I accessed the database through AdminNeo in Local, unfortunately, I accidentally delete my user name “root”, and now I cannot access my local site or the database at all because the default is root, of course. I am hoping I do not need to create a new site. I hoped I would be able to copy the site through Local App but it copied the database too and the issue persisted. I have looked for ways to fix this but most solutions require me to log into the database first which is no longer possible. I have tried skip-grant-tables in my.cnf.hbs and resetting the username through the cmd line

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [April 13, 2026, 1:24pm UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/2 "2026-04-13T13:24:18Z")

</div>

Hi @Learn!

If you click on Site Shell (in the Local app, the button is under your site name towards the top), does that open for you okay?

If that opens, can you try running `mysql -u root` to connect to the database and then this?

> CREATE USER ‘root’@‘localhost’ IDENTIFIED BY ‘’;  
> GRANT ALL PRIVILEGES ON _._ TO ‘root’@‘localhost’ WITH GRANT OPTION;  
> FLUSH PRIVILEGES;

There are other workarounds, but hopefully this does the trick without as much trouble.

---

<div class="post-metadata">

**Author:** ![Learn](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@Learn](https://community.localwp.com/u/Learn)\
**Post date:** [April 13, 2026, 6:56pm UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/3 "2026-04-13T18:56:27Z")

</div>

Hi I can’t run mysql -u root. Every time, access is denied for ‘root’@’localhost’

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [April 13, 2026, 9:04pm UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/4 "2026-04-13T21:04:55Z")

</div>

I think your best bet will be the new site route. You could create a new, blank install, and then manually migrate your WP-Content and any database tables you need into the new one. The steps would be similar to our manual steps here:

[Manually Import a Local Site](https://localwp.com/help-docs/getting-started/how-to-import-a-wordpress-site-into-local/#Manually-Import-a-Local-site)

Once you have the new site working, I’d recommend making a fresh backup with our native Cloud Backups feature. That way if you run into trouble again, you can just quickly restore from a backup point. [Local Cloud Backups - Local](https://localwp.com/help-docs/local-features/local-cloud-backups/)

---

<div class="post-metadata">

**Author:** ![Learn](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@Learn](https://community.localwp.com/u/Learn)\
**Post date:** [April 15, 2026, 4:51am UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/5 "2026-04-15T04:51:31Z")

</div>

Oh my goodness, thank you so much! But I have to add, on the new site, the Command Line didn’t work so I had to import the local.sql file in Admin Neo instead. It gave me access to the front facing end of my site but I still had issues connecting to the admin php until I searched and replaced on the command line. EXCEPT now I cannot access the admin of my site with the username and password I chose for the _new site_ and I had to use my old username and password combination.

Thank you so much!

---

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [April 15, 2026, 12:54pm UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/6 "2026-04-15T12:54:00Z")

</div>

Glad to hear you got things working again @Learn!

If you ever need to edit or create new admin credentials manually we have some steps on how to do that here as well: [Reset a WordPress admin password - Local](https://localwp.com/help-docs/troubleshooting/reset-a-local-sites-wordpress-admin-password/)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [April 17, 2026, 12:54am UTC](https://community.localwp.com/t/need-to-reset-the-database-username-or-create-a-new-database/52074/7 "2026-04-17T00:54:03Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
