Skip to content

Instantly share code, notes, and snippets.

View Zszywaczyk's full-sized avatar

Patryk Chowratowicz Zszywaczyk

View GitHub Profile
@Zszywaczyk
Zszywaczyk / Bash script - linux console
Last active October 29, 2023 04:09
Wordpress MySQL script to change URL from old to new
//Not tested yet!
1. Create bash script eg. bash.sh
2. Write:
#!/bin/bash
DB_USER="your_db_user"
DB_PASS="your_db_password"
DB_NAME="your_db_name"
mysql -u$DB_USER -p$DB_PASS $DB_NAME << EOF
1. Open CDM as Administrator
2. Type: setx PATH "%PATH%;C:\xampp\php" /m
3. Close and reopen CMD as administrator
4. For test type: php -v
5. Type setx PATH "%PATH%;C:\xampp\mysql\bin" /m
6. For test type: mysql -V