Issue deleting DB (UI+CLI)

Hello all. Long time no see due to work work work :frowning: I hope everyone is doing fine.

I’m trying to delete a MySQL database but both UI and CLI give error: Error: db db user_tipsw[ doesn't exist Most probably that bracket at the end of the DB name is messing things up.

To be precise, the CLI is giving the error:

grep: Unmatched [, [^, [:, [., or [=
Error: db db user_tipsw[ doesn't exist

I also tried putting the DB name inside single and double quotes, but the error remains the same.

As far as I remember, the DB was created via Quick Install App > WordPress and most probably I set the bracket in the DB name by mistake. WordPress installed and works correctly. Maybe some sanitization is needed in the Quick Install procedure, to avoid special characters in DB names.

What is the proposed way to delete this DB?

I don’t even think [ is a valid character for but I could be wrong

Try escaping [

user_tipsw[

So I could be wrong…

Good point. I just tried v-delete-database user user_tipsw\[ but the result is identical.

Looking at the shell scripts bin/v-delete-database, func/db.sh and func/main.sh I understand that I need to do the following manually:

  1. Run these commands in MySQL
DROP DATABASE 'user_tipsw[';
REVOKE ALL ON 'user_tipsw['.* FROM 'user_tipswp'@'%'
REVOKE ALL ON 'user_tipsw['.* FROM 'user_tipswp'@localhost
DROP USER 'user_tipswp'@'%'
DROP USER 'user_tipswp'@'localhost'
  1. Remove the relevant DB line from $USER_DATA/db.conf

  2. Decrease the value of U_DB_BASES= in $HESTIA/conf/$mysql.conf
    Not sure if I need to do anything with U_SYS_USERS= but I guess not.

  3. Decrease the counter U_DATABASES= in $HESTIA/data/users/[USER]/user.conf

@eris do you thing there is something more I should pay attention to?

No it should be fine