SQL for Web Developers (Part I)

Raq Robinson
Jun 19 · 4 min read
Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

DATABASE STRUCTURE

Image for post
Image for post
Image for post
Image for post

Image for post
Image for post
echo 'export PATH="/usr/local/mysql/bin:$PATH"' >> ~/.bash_profilemysql --version
mysql -u root -p
Image for post
Image for post
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'username'@'localhost';
FLUSH PRIVILEGES;
//Show privileges 
SHOW GRANTS FOR 'username'@'localhost';
//Remove privileges
REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'username'@'localhost';
//Delete user
DROP USER 'username'@'localhost';
Image for post
Image for post

The Startup

Medium's largest active publication, followed by +704K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store