Installing Software

Throughout this course, we will use three different pieces of software, MySQL, Python, and MongoDB. You are required to install them on your own machine. I will give you some helpful information about installing MySQL and Python.

Installing MySQL

To set up for this course please follow the steps below:

I assume you have either Microsoft Windows or MacOS as your the operating system on your machine although I myself use Linux as mine (if you are a Linux user, I don't worry about this step). The two different operating systems require different installation processes.

1. Install Microsoft Visual C++ (Windows users only)

First of all, Windows users need to install Microsoft Visual C++ to make MySQL installer work. Here's the link:

https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

It's very likely that you need to install x64 version, but if it didn't work (if it worked, it will require you to reboot your machine), try x86 and AMD64 in that order.

2. Install MySQL Server

Here's pretty good tutorials I could find from the Internet search.

Please choose "Developer Default" as a "Setup Type." Except for selecting the password, you don't need to change anything from the default settings.

Windows users don't need any further steps for MySQL.

  • MacOS:

https://dev.mysql.com/doc/mysql-osx-excerpt/5.7/en/osx-installation-pkg.html

When you choose "Installation Type," DO NOT uncheck any package.

Mac users also need to 'start' the server.

https://dev.mysql.com/doc/mysql-osx-excerpt/5.7/en/osx-installation-launchd.html

Also, you will be required to set a password for root user (will explain what this means later). You need to remember the password!

3. Install a MySQL client software (Mac users only)

Mac users need to install MySQL client software for this class. You can simply think of a client software as a nice-looking user interface you can use to communicate with MySQL server. I will elaborate on this later. Windows users already have a default one -- MySQL Workbench (you can simply find it from the start menu and click on the icon to run it. The Mac version of MySQL doesn't have such a client. There are hundreds of MySQL client software for Mac, but I recommend Sequel Pro. Here you can easily download the installer.

https://sequelpro.com/download

3. Test Run MySQL

https://dev.mysql.com/doc/mysql-getting-started/en/

Installing Python

Python is one of the most common computer language that is known for its (human-language like) easy grammar and relatively good performance. Python is so versatile that it is used everywhere. In this course, we will only dabble on Python to experience how a business Web application can/should communicate with MySQL. (You will learn full skill set from ANOTHER COURSE)

What you will install is Anaconda. Anaconda is a "distribution" of Python. Don't worry too much about what "distribution" is. Anaconda is just a collection of software, including Python, and some others that help you use Python in a more user-friendly fashion.

Again, Windows users and Mac users have slightly different steps to follow to install Jupyter.

1. Windows

Please be careful about Step 8. You need to choose "add Anaconda to your PATH environment variable" on that step.

https://docs.anaconda.com/anaconda/install/windows/

2. MacOS (graphical install should be enough)

https://docs.anaconda.com/anaconda/install/mac-os/

Once Anaconda is installed, you need to install a package that allows MySQL server and Python can communicate. Open your cmd (Windows) or terminal (MacOS) and install two packages:

pip install --default-timeout=100 protobuf
pip install --default-timeout=100 mysql-connector-python 

IGNORE THE FOLLOWING PART, AND GO ON TO PYTHON SECTION!

For connection with MySQL, please enter into MySQL, and do this:

mysql> GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql> GRANT SELECT ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
mysql> GRANT SELECT,UPDATE,INSERT,DELETE ON SurveyData.* TO 'root'@'localhost';
mysql> GRANT ALL PRIVILEGES ON SurveyData.* TO 'root'@'localhost';

Last updated