Fix DevKinsta “Something bad happened” / MySQL Root Password Mismatch

Fix DevKinsta “Something bad happened” / MySQL Root Password Mismatch

Symptoms

DevKinsta fails while creating or importing a site with a generic message like:

Something bad happened

The DevKinsta log shows something like:

Command 'mysql -u root -p****** -e "create database Testing;"' on devkinsta_db finished with exit code 1

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

This means DevKinsta is able to reach the devkinsta_db container, but MariaDB is rejecting the root password DevKinsta is trying to use.

The issue is not the WordPress site, import file, local domain, or macOS. It is a password mismatch between DevKinsta and the MariaDB root user inside the Docker volume.


What Finally Fixed It

Set the MariaDB root password inside the devkinsta_db volume to match the password DevKinsta expects.


Step 1: Quit DevKinsta Completely

Closing the DevKinsta window is not enough because it may keep running in the tray/menu bar.

Run:

osascript -e 'quit app "DevKinsta"'
pkill -f DevKinsta

Step 2: Find the DevKinsta Database Password

Open DevKinsta’s config file:

open "$HOME/Library/Application Support/DevKinsta/config.json"

Look for the database/root password DevKinsta is using.

Do not paste this password into chat, email, Slack, tickets, etc.


Step 3: Stop the DevKinsta Database Container

docker stop devkinsta_db

Step 4: Confirm the MariaDB Image DevKinsta Is Using

docker inspect devkinsta_db --format '{{.Config.Image}}'

Make note of the image it returns, for example:

mariadb:10.5.5

Use that same image in the next command.


Step 5: Start a Temporary MariaDB Repair Container

This mounts the existing DevKinsta database volume but starts MariaDB with grant tables disabled so the root password can be reset.

If your DevKinsta DB volume is devkinsta_db_data, run:

docker run --name devkinsta_db_password_fix \
-v devkinsta_db_data:/var/lib/mysql \
-d mariadb:10.5.5 mysqld --skip-grant-tables

If Step 4 showed a different MariaDB image, use that image instead of mariadb:10.5.5.


Step 6: Open MariaDB Without a Password

docker exec -it devkinsta_db_password_fix mysql -u root

Step 7: Reset the Root Password

At the MariaDB prompt, run the following.

Replace PASTE_DEVKINSTA_PASSWORD_HERE with the password from DevKinsta’s config.json.

FLUSH PRIVILEGES;

ALTER USER 'root'@'localhost' IDENTIFIED BY 'PASTE_DEVKINSTA_PASSWORD_HERE';

CREATE USER IF NOT EXISTS 'root'@'%' IDENTIFIED BY 'PASTE_DEVKINSTA_PASSWORD_HERE';
ALTER USER 'root'@'%' IDENTIFIED BY 'PASTE_DEVKINSTA_PASSWORD_HERE';

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;
EXIT;

This sets both:

root@localhost
root@%

That matters because the DevKinsta log specifically failed as root@localhost, but other DevKinsta services may connect using a different host context.


Step 8: Remove the Temporary Repair Container

docker rm -f devkinsta_db_password_fix

Step 9: Restart the Real DevKinsta Database Container

docker start devkinsta_db

Step 10: Test the Password Manually

docker exec -it devkinsta_db mysql -u root -p -e "SHOW DATABASES;"

Paste the DevKinsta database password when prompted.

If it shows the databases, the password reset worked.


Step 11: Reopen DevKinsta

open -a DevKinsta

Then create or import the site again.


Optional Diagnostic Commands

Check DevKinsta containers:

docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}" | grep devkinsta

Check which Docker volume is mounted to MariaDB:

docker inspect devkinsta_db --format '{{range .Mounts}}{{println .Name "=>" .Destination}}{{end}}'

The database volume should be mounted to:

/var/lib/mysql

Notes

Deleting and rebuilding the DevKinsta containers alone may not fix this because Docker volumes survive container deletion.

The container can be new while the MariaDB data volume still contains old internal users/passwords.

The direct fix is to make MariaDB’s actual root password match the password DevKinsta is trying to use.