# MySQL database fails to install when I try to create new custom site

**URL:** https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854
**Category:** Installation
**Created:** [November 6, 2022, 5:25pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854 "2022-11-06T17:25:13Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 6, 2022, 5:25pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/1 "2022-11-06T17:25:13Z")

</div>

# Database installation fail.

I downloaded devkinsta and docker as per the installation tutorial but every time I try to create either a new WordPress site or a custom site the installation does not complete and it is the MySQL database step which fails (2nd step). Can anyone suggest what I need to check out/try to resolve this problem please?

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 5:13pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/2 "2022-11-07T17:13:01Z")

</div>

Hi @Chris_Renshaw, welcome to DevKinsta!  
What operating system are you using? Is the error similar to this one: [Creating new Site, something bad happened](https://community.kinsta.com/t/creating-new-site-something-bad-happened/1813)

Can you please private message your [main.log file](https://kinsta.com/knowledgebase/devkinsta/error-codes/#info) to me?

 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/3/3d562ab1163f46367d1927181a0523261c39dc6a.png)

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 5:35pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/3 "2022-11-07T17:35:12Z")

</div>

My operating system is Windows.

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 5:37pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/4 "2022-11-07T17:37:58Z")

</div>

Thank you, can you please private message your log files to me? They will be here:  
`C:\Users\USERNAME\AppData\Roaming\DevKinsta\logs`

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 6:31pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/5 "2022-11-07T18:31:30Z")

</div>

[2022-11-07 18:29:33.876] [info] Response data: { total: 0, count: 0, start: 0, items: }  
[2022-11-07 18:29:33.877] [info] [clearSiteMailbox] Deleting 0 emails for site portfolio.local.  
[2022-11-07 18:29:33.878] [info] [dockerUtil/getContainer] Get ‘devkinsta\_nginx’ Docker container  
[2022-11-07 18:29:34.168] [info] [containerExec] Command ‘rm -rf -R www/kinsta/public/portfolio www/kinsta/logs/portfolio\_access.log www/kinsta/logs/portfolio\_error.log www/kinsta/ssl/portfolio.local.crt www/kinsta/ssl/portfolio.local.key’ on devkinsta\_nginx finished with exit code 0  
[2022-11-07 18:29:34.171] [info] [deleteDns] remove dns record of the portfolio.local domain  
[2022-11-07 18:29:34.173] [info] [dockerUtil/getContainer] Get ‘devkinsta\_fpm’ Docker container  
[2022-11-07 18:29:34.187] [info] [ProgressIndicator] { isFailed: false, isOpen: true }  
[2022-11-07 18:29:34.425] [info] [ProgressIndicator] { isFailed: false, isOpen: true }  
[2022-11-07 18:29:34.597] [info] [containerExec] Command ‘mysql -u root -p\*\*\*\*\*\* -e “DROP DATABASE portfolio;”’ on devkinsta\_db finished with exit code 1  
[2022-11-07 18:29:34.948] [info] [containerExec] Command ‘rm -rf -R www/kinsta/public/portfolio www/kinsta/logs/portfolio\_access.log www/kinsta/logs/portfolio\_error.log www/kinsta/ssl/portfolio.local.crt www/kinsta/ssl/portfolio.local.key’ on devkinsta\_nginx finished with exit code 0  
[2022-11-07 18:29:34.980] [info] [containerExec] Command ‘dns\_server delete -d portfolio.local’ on devkinsta\_fpm finished with exit code 0  
[2022-11-07 18:29:35.333] [info] [containerExec] Command ‘dns\_server delete -d portfolio.local’ on devkinsta\_fpm finished with exit code 0  
[2022-11-07 18:29:35.561] [info] [useMailhog] Mail socket closed.  
[2022-11-07 18:29:41.382] [info] [main.dev.ts] Create tray icon  
[2022-11-07 18:29:41.385] [info] [main.dev.ts] close setting: false  
[2022-11-07 18:29:41.387] [info] [main.dev.ts] Start closing main window  
[2022-11-07 18:29:41.520] [info] [main.dev.ts] Stop docker containers  
[2022-11-07 18:29:41.521] [info] [stopContainers] Stop containers  
[2022-11-07 18:29:41.523] [info] [main.dev.ts] Disable Public Link  
[2022-11-07 18:29:41.642] [info] [clearPublicLink] disabled sites public links  
[2022-11-07 18:29:41.644] [info] [main.dev.ts] Destroy main window  
[2022-11-07 18:29:42.015] [info] Closing application

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 6:34pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/6 "2022-11-07T18:34:26Z")

</div>

The error is similar to the one you mention above

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 6:42pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/7 "2022-11-07T18:42:16Z")

</div>

My full mail log is 761010 characters long so I can’t show it all

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 6:46pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/8 "2022-11-07T18:46:51Z")

</div>

Thanks @Chris_Renshaw, are you seeing this line in your logs:  
`[Warning] Access denied for user 'root'@'localhost' (using password: YES)`

You can also private message the main.log to me and upload it as an attachment.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/1/1e21108d6ca41a48c5b61d804e1b83e0a960025c.png)

My solution in [the above thread](https://community.kinsta.com/t/creating-new-site-something-bad-happened/1813) should work in every case. It’s very hard to tell why this occurs for certain users but if you can share the main.log, I’ll ask our developers to review it as well.

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 6:51pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/9 "2022-11-07T18:51:25Z")

</div>

[DBlog071122.txt](https://community.kinsta.com/uploads/short-url/fXWPbtMylWfs3Rlo7ZeqRWMKZjK.txt) (9.3 KB)  
See attached

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 6:59pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/10 "2022-11-07T18:59:18Z")

</div>

The second step in the “above thread” did not work. I got message /bin/sh: 1: docker: not found

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 7:02pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/11 "2022-11-07T19:02:06Z")

</div>

That’s odd, are you running that from Command Prompt?

Does the plain command “docker” return the same error?  
If you are using WSL2, you can try to run the commands from a WSL terminal  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/kinsta/original/2X/e/ef0ed08e51632dbff7c71d8ca3a6ceaa8e539766.jpeg)

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 7:04pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/12 "2022-11-07T19:04:32Z")

</div>

I’ll try both CP and WSL2

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 7:06pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/13 "2022-11-07T19:06:40Z")

</div>

I’m missing root users. Worked when I ran as administrator.

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 7:08pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/14 "2022-11-07T19:08:00Z")

</div>

±----------±------------+  
| Host | User |  
±----------±------------+  
| localhost | mariadb.sys |  
±----------±------------+

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 7:26pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/15 "2022-11-07T19:26:36Z")

</div>

That’s odd; so are you not running DevKinsta under an administrator account? That might be why.

So first I would try closing DevKinsta from the Task Manager, then running it as an Administrator. It might be able to create the root user with admin permissions.

If that doesn’t work, I can try to adapt my guide to show you how to create the root mysql users.

All that being said, if you aren’t running DevKinsta under a root/administrator user, you might run into some more issues further down the road.

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 8:37pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/16 "2022-11-07T20:37:09Z")

</div>

It doesn’t work for me despite running it as administrator

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 8:52pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/17 "2022-11-07T20:52:13Z")

</div>

Are you currently logged into a non-administrator user in Windows?

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 8:56pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/18 "2022-11-07T20:56:47Z")

</div>

Is that what the problem is do you think?

---

<div class="post-metadata">

### Author: ![Kevin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/kevin/32/808_2.png) [@Kevin](https://community.kinsta.com/u/Kevin)
#### Post date: [November 7, 2022, 9:16pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/19 "2022-11-07T21:16:05Z")

</div>

Yes, that could definitely cause problems.

If possible, please try installing it only for the administrator user and see if you get the same error.

Otherwise, you would have to manually create those root users. In step 4 [here], you would just replace “ALTER” with “CREATE” ([Creating new Site, something bad happened - #5 by Kevin](https://community.kinsta.com/t/creating-new-site-something-bad-happened/1813/5))

> docker exec -it devkinsta\_reset\_mariadb\_root mysql mysql -e “FLUSH PRIVILEGES; CREATE USER ‘root’@‘%’ IDENTIFIED BY ‘PASSWORD\_HERE’;  
> CREATE USER ‘root’@‘localhost’ IDENTIFIED BY ‘PASSWORD\_HERE’;  
> GRANT ALL PRIVILEGES ON _._ TO ‘root’@‘localhost’ IDENTIFIED BY ‘PASSWORD\_HERE’;  
> GRANT ALL PRIVILEGES ON _._ TO ‘root’@‘%’ IDENTIFIED BY ‘PASSWORD\_HERE’;FLUSH PRIVILEGES;”

---

<div class="post-metadata">

### Author: ![Chris\_Renshaw](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/chris_renshaw/32/1578_2.png) [@Chris\_Renshaw](https://community.kinsta.com/u/Chris_Renshaw)
#### Post date: [November 7, 2022, 10:10pm UTC](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854/20 "2022-11-07T22:10:58Z")

</div>

I have just carried out those instructions, pressed enter and it says:  
Error: No such container: devkinsta\_reset\_mariadb\_root

[Next page](https://community.kinsta.com/t/mysql-database-fails-to-install-when-i-try-to-create-new-custom-site/1854.md?page=2)
