It sounds like you are fairly confident that you have set up the new MySQL user correctly, but have you double checked that you have log into MySQL with your new user?
I.e.:
Try logging in like this:
mysql -u user001 -p new_db_name
It should ask for your password and if everything is as it should be, you should be dropped into a mysql session. I.e. it should look something like this:
root@TEST-lamp ~# mysql -u user001 -p new_db_name
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 62
Server version: 10.5.15-MariaDB-0+deb11u1 Debian 11
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [new_db_name]>
If that doesn't work, then there is something wrong with your user or database. FWIW, this should create a new DB 'new_db_name' owned by a new user 'user001' (I set variables first so it's easy to reuse in your specific scenario - just change the first 3 lines for your purposes):
db_name="new_db_name"
db_user="user001"
db_pass="my_awesome_password"
mysqladmin create "$db_name"
mysql --batch --execute "GRANT ALL PRIVILEGES ON $db_name.* TO $db_user@localhost IDENTIFIED BY '$db_pass'; flush privileges;"
mysql --batch --execute "ALTER DATABASE $db_name CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;"
If the above does work (or you recreate it and confirm it works) and your app still doesn't work, please double check the username and password that your app is using.
If you can confirm all the above is as it should be, then my remaining guess is some "special character" in the password (e.g. a punctuation mark) that isn't being processed properly. Perhaps retry with a long random string of "normal" characters. E.g. an mcookie:
Have you tested logging in as the new user?
It sounds like you are fairly confident that you have set up the new MySQL user correctly, but have you double checked that you have log into MySQL with your new user?
I.e.:
Try logging in like this:
It should ask for your password and if everything is as it should be, you should be dropped into a mysql session. I.e. it should look something like this:
If that doesn't work, then there is something wrong with your user or database. FWIW, this should create a new DB 'new_db_name' owned by a new user 'user001' (I set variables first so it's easy to reuse in your specific scenario - just change the first 3 lines for your purposes):
If the above does work (or you recreate it and confirm it works) and your app still doesn't work, please double check the username and password that your app is using.
If you can confirm all the above is as it should be, then my remaining guess is some "special character" in the password (e.g. a punctuation mark) that isn't being processed properly. Perhaps retry with a long random string of "normal" characters. E.g. an mcookie:
I hope that helps. If you continue to have issues, perhaps share more about the app you are trying to install?