I’ve just run the installer - a few times now - and when click the “Open Site” button, it asks me to input the credentials/details of a MySQL install - which is outlined in the software. I fill those all in, and then get the error:
Error establishing a database connection
I’ve uninstalled, reinstalled, created a new site etc…several times, but the issue is still the same.
I’ve checked Docker, and there is no MySQL server running, just MariaDB.
What have I done wrong?
Hi @Dave_Smith, welcome to DevKinsta!
Is this also a brand new Docker install? Do you have any other local development programs installed that could be conflicting?
If possible, can you do a factory reset of Docker then relaunch DevKinsta? I’m also wondering if you are able to open the Database Manager for the site. Is that also producing a connection error?
Hi, thanks for the reply.
If I try to open the DB Manager, I get the following:
SQLSTATE[HY000]  MySQL server has gone away
It’s a brand new laptop - although I do have Visual Studio 2022 installed…
It was a fresh install of Docker.
I uninstalled it, and then uninstalled DevKinsta - then reinstalled from scratch…
…and I get the same errors.
I don’t know if there should be a MySQL docker image listed…but there isn’t one, and I don’t have MySQL installed locally, so I’m unsure what DB it’s trying to connect to.
Does your Docker look something like this?
I’m not sure if VS 2022 could conflict, though.
Can you please share your main.log file with me? I’ll look this over with our Devs.
Yes, it looks exactly like that!
(also, I wasn’t aware that MariaDB was a fork of MySQL! - I am now!)
main.log (262.8 KB)
So in your main.log, I see there’s an issue happening during the hostfile step:
'ho' is not recognized as an internal or external command,
operable program or batch file.
If you open the hosts file as an administrator, are you able to see the DEVKINSTA entries for your site?
Everything you see after “echo” should be getting added to your hosts file. If it isn’t you could manually add the
127.0.0.1 sitename.local and
::1 sitname.local entries to the file.
I also recommend completely shutting down DevKinsta then trying to run it as Administrator before trying to create a site again.
I can definitely see hosts file issues leading to the error you are seeing. Please let me know if none of that works!
Hi Kevin. Thank you for your reply. Truly appreciated.
In my hosts file I do have the entries already:
START DEVKINSTA entries
END DEVKINSTA entries
I have already been running the DevKinsta installer as Administrator, and this is the result (in fact, I have run it as admin, not as admin, completely uninstalled, reinstalled, downloaded fresh, run as admin/not as admin etc…and the result is the same each time. FYI, I am copying the DB creds/name etc… from the app itself to eliminate typo errors for the password etc…)
So, sadly, it looks like the hosts file step IS working, and it appears that the .js file can’t read it for some reason…like the string it’s using to reference the hosts file is truncated at “ho”… for some reason.
In the MariaDB container, if I “show databases;” - the database it professes to have created isn’t there. I have tried to create it manually, and have set a new password, and used those credentials instead, but it still doesn’t connect and I get the same error.
Thanks for the breakdown @Dave_Smith
I’m still trying to figure out what could be unique about your system that would cause this. Something similar was brought up by a different user. It’s worth trying what was suggested here.
Also it may not make a difference in this case, but a full uninstall of DevKinsta also involves deleting a few folders. I just wanted to point that out in case you hadn’t tried that already.
I’m bringing your issues to our dev’s attention and hopefully they will be able to spot the issue based on your main.log.