# I cannot push my local dev to staging

**URL:** <https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609>\
**Category:** Application Support\
**Created:** [June 19, 2024, 9:00pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609 "2024-06-19T21:00:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Sims](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_sims/32/3605_2.png) [@Chris\_Sims](https://community.kinsta.com/u/Chris_Sims)\
**Post date:** [June 19, 2024, 9:00pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/1 "2024-06-19T21:00:25Z")

</div>

Everytime I try to push my local dev site to a staging environment, I get the following error with absolutely no details. I have no idea how to proceed!  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/3/3f81cd6d38b23f2296fc3189c3a69401e336691d.png)

---

<div class="post-metadata">

**Author:** ![jackirish](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/jackirish/32/1361_2.png) [@jackirish](https://community.kinsta.com/u/jackirish)\
**Post date:** [June 19, 2024, 9:14pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/2 "2024-06-19T21:14:41Z")

</div>

Hi @Chris_Sims ! 👋 Welcome to the Kinsta Community.

Can you please provide us your main.log file from your DevKinsta installation? [Troubleshooting - Error Codes - Kinsta® Docs](https://kinsta.com/docs/devkinsta/devkinsta-troubleshooting/error-codes/)

---

<div class="post-metadata">

**Author:** ![Chris\_Sims](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_sims/32/3605_2.png) [@Chris\_Sims](https://community.kinsta.com/u/Chris_Sims)\
**Post date:** [June 22, 2024, 4:57am UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/4 "2024-06-22T04:57:51Z")

</div>

[main.log](https://community.kinsta.com/uploads/short-url/5dUsfsBO4tKpwobNBw6hg9BffV3.log) (106.4 KB)  
I’ve attached the main.log.

---

<div class="post-metadata">

**Author:** ![Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andrew/32/2792_2.png) [@Andrew](https://community.kinsta.com/u/Andrew)\
**Post date:** [June 23, 2024, 2:08am UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/5 "2024-06-23T02:08:57Z")

</div>

Hi @Chris_Sims! Thank you for your reply and sharing the main.log file.

Upon reviewing the log it looks like the error occurring is, “The user specified as a definer (‘USERNAME’@‘localhost’) does not exist when using LOCK TABLES”.

We are investigating further into why this issue is occurring and will update you as soon as possible once we have details to share. We may need to escalate this internally with our development team to help determine the root cause of this problem. We appreciate your patience while we investigate into this matter further.

In the meantime, if you do have any questions or would like to share additional information please don’t hesitate to reply.

Best regards

---

<div class="post-metadata">

**Author:** ![Chris\_Sims](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_sims/32/3605_2.png) [@Chris\_Sims](https://community.kinsta.com/u/Chris_Sims)\
**Post date:** [June 23, 2024, 7:27pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/6 "2024-06-23T19:27:17Z")

</div>

> [@Andrew](#):
>
> “The user specified as a definer (‘USERNAME’@‘localhost’) does not exist when using LOCK TABLES

Is there a workaround or anything I can do now other than the very slow and painful process of manually making these changes?

---

<div class="post-metadata">

**Author:** ![Andrew](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/andrew/32/2792_2.png) [@Andrew](https://community.kinsta.com/u/Andrew)\
**Post date:** [June 24, 2024, 3:02am UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/7 "2024-06-24T03:02:57Z")

</div>

Hi @Chris_Sims! Thank you for your reply!

There is something we can try to see if it helps workaround this issue. This would be to create a user in MariaDB that matches the username of the expected definer and grant it all permissions on the database.

Please follow the instructions below to create this user and grant all privileges on the database:

1. Start a command prompt in Windows

2. Run: docker exec -u root -it devkinsta\_db bash

3. Once you have entered into the container run: mysql -p You will be prompted for a password. You may copy/paste the database password from the wp-config.php file of your DevKinsta site.

4. In the MySQL command prompt run: GRANT ALL ON DB\_NAME.\* TO ‘learnn’@‘%’ IDENTIFIED BY ‘complex-password’;

In the above step please replace DB\_NAME with the database name listed in the wp-config.php file of the site.

1. Run FLUSH PRIVILEGES;

This should create the definer user MariaDB is looking for and hopefully allow you to push your local site to the staging environment.

Please let us know if this helps resolve the issue, or if you do continue to experience any difficulty. We are standing by and happy to help!

We look forward to hearing from you!

---

<div class="post-metadata">

**Author:** ![Chris\_Sims](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_sims/32/3605_2.png) [@Chris\_Sims](https://community.kinsta.com/u/Chris_Sims)\
**Post date:** [June 26, 2024, 10:53pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/8 "2024-06-26T22:53:24Z")

</div>

I apologize for the late response. This did seem to resolve the issue. Thank you.

---

<div class="post-metadata">

**Author:** ![merineth](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/merineth/32/3022_2.png) [@merineth](https://community.kinsta.com/u/merineth)\
**Post date:** [June 28, 2024, 1:25am UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/9 "2024-06-28T01:25:01Z")

</div>

@Chris_Sims Thank you for the update. We are glad that the workaround helped in fixing the issue.

If ever you need help or have questions in the future, please feel free to reach out here in the Community Forum. Have a great day!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/8/80f8c4e56fecc02327a0964e6bf63a716483529f.png) [@system](https://community.kinsta.com/u/system)\
**Post date:** [June 30, 2024, 1:25pm UTC](https://community.kinsta.com/t/i-cannot-push-my-local-dev-to-staging/3609/10 "2024-06-30T13:25:15Z")

</div>

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