Special characters in password cause trouble.
While doing fresh install of CiviCRM 5.38.0 on top of WordPress 5.7 using the WordPress installer GUI I wanted to switch to a different database other than installing in WordPress DB. All my attempts to edit the configuration line would fail. CiviCRM Database mysql://wordpress:HIDDEN@localhost/wordpress| I eventually chose to use the WordPress DB and succeed. Later while reading the documentation about setting up a cron job I saw the warning about not to use certain special characters in passwords. So I went back and removed the # from my password and was able to install into a separate DB. My conclusion is that the edit GUI needs to include that warning about special characters.