Immersion 2
Day Eleven
3/14/16

Trails and tribulations with MySQL are a real thing. This is one of the aspects of training I have taken to best yet still, damn. What a fickle pickle MySQL can be for a newbie. Here are some of the nice hiccups that contributed hours to my growth.

does not fly // 
INSERT INTO blog (idUser, title) VALUES (2, ‘Colonel Fraboni’s Jabronis’);
does fly // 
INSERT INTO blog (idUser, title) VALUES (2, “Colonel Fraboni’s Jabronis”);
does not fly // 
INSERT INTO post (title, subtitle, body) VALUES (‘We Run this City’, ‘Fugetaboutit’, ‘We run the mayor’s office. We run the district attorney office. We run this city. Fugetaboutit!’);
does fly // 
INSERT INTO post (title, subtitle, body) VALUES (‘We Run this City’, ‘Fugetaboutit’, “We run the mayor’s office. We run the district attorney office. We run this city. Fugetaboutit!”);

The big take away be precise or MySQL is not so nice. After much trail and tribulations with simple operations for any MySQL wizard, I was finally able to do a database dump and jump off of cloud9 and right onto the command line and Sequelize. Let me show you how.

Data dump 
Once you’ve added data, you’ll dump the database into a flat file so you can recreate it from scratch with your data intact. Run the following command:

mysqldump — databases — add-drop-database -u `echo $C9_USER|cut -c1–16` blog > blog.sql;

Once you’ve dumped your database, run the following commands:

NPM Installation
npm install
npm install -g sequelize-auto
npm install -g mysqldump

If you are doing the Git gimmick then next up…

After **all tests pass**, add all changes to git, commit and push to your fork.
git add -A
git commit -m ‘commit message’
git push
git remote add upstream

Getting sequelized fool!

On a glorious journey from novice to pro through immersion recursion what what…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.