Long story short I'm wanting to change the root mysql user password?
Looking at the config in .ddev
it looks pretty baked in (for example in .ddev/.global_commands/host/sequelace
the root user name and password are hard coded).
I can go the long way around and do something like https://www.cyberciti.biz/tips/recover-mysql-root-password.html, but wanted to check first.
Yes, of course you have full control of the database.
In DDEV the default root password is "root", so if that's good enough for you you don't have to change it.
But with MySQL or MariaDB, you would just change it using
ddev mysql -u root
and change the password for root@%
and root@localhost
:
ALTER USER 'root'@'localhost' IDENTIFIED BY 'somenewpassword';
ALTER USER 'root'@'%' IDENTIFIED BY 'somenewpassword';
FLUSH PRIVILEGES;
The built-in default password will no longer work of course.
DDEV just uses a standard mysql/mariadb server.
If you're using postgresql the procedure would be slightly different but the same idea with ddev psql
.
For basics of database management see https://ddev.readthedocs.io/en/latest/users/basics/database_management/