Difference between revisions of "Tutorial: PhpRunner 9.8 and Photo Display"
Line 304: | Line 304: | ||
sudo chown -R www-data:www-data $fullDir 2> /dev/null | sudo chown -R www-data:www-data $fullDir 2> /dev/null | ||
+ | * Create MYSQL User and DB. On EC2 | ||
+ | |||
+ | mysql -u root -p | ||
+ | create database NohoSkies; | ||
+ | CREATE USER 'nohoSkies'@'localhost' IDENTIFIED BY 'xxxxxxxx'; | ||
+ | grant all privileges on NohoSkies . * to 'nohoSkies'@'localhost' ; | ||
+ | FLUSH PRIVILEGES; | ||
+ | quit | ||
+ | |||
+ | * Migrate MySQL database from MacBook to EC2 | ||
+ | |||
+ | cd ~/Downloads/ | ||
+ | echo "USE NohoSkies;" > NohoSkies.sql | ||
+ | mysqldump -u root -pvoidm%20 NohoSkies >> NohoSkies.sql | ||
+ | |||
+ | echo "rsyncing MySqlDump to EC2" | ||
+ | rsync -az -e "ssh -i ~/.ssh/mykeyDFT.pem" \ | ||
+ | NohoSkies.sql ubuntu@dominiquefthiebaut.com:Downloads/ | ||
+ | |||
+ | echo "loading up MySQL dump in EC2 MySQL DB" | ||
+ | ssh -i "~/.ssh/mykeyDFT.pem" -tt ubuntu@dominiquefthiebaut.com <<EOF | ||
+ | mysql -u root -pvoidm%20 < ~/Downloads/NohoSkies.sql | ||
+ | exit | ||
+ | EOF | ||
+ | |||
+ | * | ||
+ | |||
<br /> | <br /> | ||
<br /> | <br /> |