wp-cli / db-command

Performs basic database operations using credentials stored in wp-config.php.
MIT License
71 stars 59 forks source link

wb db export giving warning for every new website #238

Closed philartuz closed 1 year ago

philartuz commented 1 year ago

I get this warning upon running wp db export in git bash

Warning: Failed to get current character set of the posts table. Reason: '"mysql --no-auto-rehash --batch --skip-column-names --host="localhost" --user="root" --default-character-set="utf8" --execute="SELECT' is not recognized as an internal or external command, operable program or batch file.

'"mysqldump "local" --skip-column-statistics --no-tablespaces --host="localhost" --user="root" --result-file="local-2023-06-21-ae303d9.sql" --default-character-set="utf8mb4""' is not recognized as an internal or external command, operable program or batch file.

to fix it I was informed by my supervisor to copy paste this portion of the warning

mysqldump "local" --skip-column-statistics --no-tablespaces --host="localhost" --user="root" --result-file="local-2023-06-21-ae303d9.sql" --default-character-set="utf8mb4"

Afterwards I have to type in

ls *.sql

The problem is I have to do this everytime for a new local website

Is there a permanent fix to this? This seems to be happening for my colleagues as well.

If there's any extra information anyone would like me to provide