Creating new Site, something bad happened

Okay, lets try completely resetting the MYSQL credentials; I’m going to write this as a general guide for other in the future as well:

  1. You will need the MySQL root password that DevKinsta is using, It should match what you are seeing there for devkinsta_db in Docker Desktop, but you can doublecheck by looking in your config.json file. Its location depends on your OS but it will be in one of the data directories listed at the bottom of the article here.

  2. We will need to create a temporary mysql container via the terminal to change the credentials/permissions with this command:
    docker container stop devkinsta_db && docker run --name devkinsta_reset_mariadb_root -v devkinsta_db_data:/var/lib/mysql/ -d mariadb:10.5.5 mysqld --skip-grant-tables

  3. Now check the mysql users with this command:
    docker exec -it devkinsta_reset_mariadb_root mysql mysql -e "SELECT Host,User FROM mysql.user"
    This is what you should see, please let me know if this is different for you:
    image

  4. This next block of code is what changes the password/privileges. Be sure to replace the four instances of PASSWORD_HERE with your password; paste this into your terminal as a single command once you change the password:

docker exec -it devkinsta_reset_mariadb_root mysql mysql -e "FLUSH PRIVILEGES; ALTER USER 'root'@'%' IDENTIFIED BY 'PASSWORD_HERE';\
ALTER 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;"
  1. Remove the temporary container and restart Mariadb:
    docker rm -f devkinsta_reset_mariadb_root && docker container start devkinsta_db

Now, if this doesn’t work then it’s most likely that you are missing the root users. Please let me know if that’s the case/share what you had at step 3.

Sorry for how involved this is. We still can’t find the root cause for this issue and it does not happen for everyone. I’ll be sure our developers are aware that this is still happening for some.