Comments (2)
What bash script ?
you've logged this as an issue, it's not linked to a specific file.
from learn-cantrill-io-labs.
it is related to this file learn-cantrill-io-labs/aws-dms-database-migration/02_LABINSTRUCTIONS
/STAGE4 - Migrate Database & Cutover.md
#!/bin/bash
source <(php -r 'require("/var/www/html/wp-config.php"); echo("DB_NAME=".DB_NAME."; DB_USER=".DB_USER."; DB_PASSWORD=".DB_PASSWORD."; DB_HOST=".DB_HOST); ')
SQL_COMMAND="mysql -u $DB_USER -h $DB_HOST -p$DB_PASSWORD $DB_NAME -e"
OLD_URL=$(mysql -u $DB_USER -h $DB_HOST -p$DB_PASSWORD $DB_NAME -e 'select option_value from wp_options where option_id = 1;' | grep http)
HOST=$(curl http://169.254.169.254/latest/meta-data/public-hostname)
$SQL_COMMAND "UPDATE wp_options SET option_value = replace(option_value, '$OLD_URL', 'http://$HOST') WHERE option_name = 'home' OR option_name = 'siteurl';"
$SQL_COMMAND "UPDATE wp_posts SET guid = replace(guid, '$OLD_URL','http://$HOST');"
$SQL_COMMAND "UPDATE wp_posts SET post_content = replace(post_content, '$OLD_URL', 'http://$HOST');"
$SQL_COMMAND "UPDATE wp_postmeta SET meta_value = replace(meta_value,'$OLD_URL','http://$HOST');"
from learn-cantrill-io-labs.
Related Issues (20)
- Pet-Cuddle-O-Tron | CORS issue between S3 and API gateway HOT 8
- MySQL RDS - Aurora compatibility issue HOT 3
- Advanced Hybrid Directory - STAGE 2E - Connect to the 'client' instance HOT 4
- VPC - EFS - lambda lab instance B not deploying successfully HOT 1
- CatPipeline - STAGE4 - Deploy our Container w/ CodeDeploy - PART1 HOT 2
- Videos are marked private? HOT 3
- WebIDF CloudFormation quicklink, failing to deploy HOT 4
- Instructions do not match ASL code
- mysql command not found HOT 1
- [Macie Lab] URL pointing to Sydney region HOT 1
- colliding group is in the working tree
- Pet-Cuddle-O-Tron - STAGE 3B ASL code does not match video HOT 1
- CloudFront caching causes this demo to not work (at least for me) HOT 2
- Project proposal submitted
- This typo cause failure in importing data to MySQL HOT 1
- minor cosmetic issue
- Build error with catpipeline HOT 5
- aws-hybrid-DNS
- STAGE 2B - Add Userdata - ISSUE HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-cantrill-io-labs.