To reinitialize the Magento 2 database with defaults, you can use the setup:install command with the --use-sample-data option. This command will remove all existing data from the database and install the Magento 2 sample data along with the default configuration.
php bin/magento maintenance:enable
Remove all existing data from the database by running the following command:
php bin/magento setup:uninstall -n
Run the following command to install Magento 2 with sample data and default configuration:
php bin/magento setup:install --base-url=http://127.0.0.1/Szco/pub --db-host=localhost --db-name=SZCO_1 --db-user=root --db-password=Pass1234 --admin-firstname=Admin --admin-lastname=User --admin-email=admin@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/New_York --use-rewrites=1
Perform upgrade deploy and di compile