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

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?

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

Can you please private message your main.log file to me?

My operating system is Windows.

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

[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

The error is similar to the one you mention above

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

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

My solution in the above thread 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.

DBlog071122.txt (9.3 KB)
See attached

1 Like

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

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

I’ll try both CP and WSL2

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

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

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.

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

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

Is that what the problem is do you think?

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)

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;”

I have just carried out those instructions, pressed enter and it says:
Error: No such container: devkinsta_reset_mariadb_root