L01 Mysql Workbench Setup
L01 Mysql Workbench Setup
Table of Contents:
1. Installing MySQL and MySQL Workbench on Windows.
2. Installing MySQL and MySQL Workbench on MacOS.
3. Setting up Farmer’s Database on Workbench for all the subsequent lectures
1) Open the MySQL website on a browser. Click on the following link: MySQL
Downloads.
7) It will ask for permission; when it does, click Yes. The installer will then
open. Now, it will ask to choose the setup type. Here, you can either choose
'Developer (Default)' OR 'Custom'.
8) Click on Next. With this, you will install MySQL server, MySQL Workbench,
and MySQL shell.
9) Open MySQL Servers, select the server you want to install, and move it to the
Products/Features to be installed window section. Now, expand Applications,
choose MySQL Workbench and MySQL shell. Move both of them to
‘Products/Features to be installed’.
10) Click on the Next button. Now, click on the Execute button to download and
install the MySQL server, MySQL Workbench, and the MySQL shell.
11) Once the product is ready to configure, click on Next. Under Type and
Networking, go with the default settings and select Next.
12) Set the root password. For authentication, use the recommended strong
password encryption. Upon setting the password click next.
13) Go for the default windows service settings and under the apply
configuration, click on execute. Once the configuration is complete, click on
finish.
14) Complete the installation. This will now launch the MySQL Workbench and
the MySQL Shell.
15) Once MySQL Workbench is installed, select the Local instance and enter the
password that you have set before. Now, you can use the MySQL query tab to
write your SQL queries.
You can also refer to this link for installation of MySQL Workbench on Windows
10: https://www.youtube.com/watch?v=LnOnzNQnJMU
2. For Macbook Users
1) Open the MySQL website on a browser. Click on the following link: MySQL
Downloads.
3) Scroll down to the page where you can find MySQL Community (GPL)
Downloads. Click on that and it redirects to the Community Downloads page.
8) Run the wizard, keep all defaults and complete the installation
9) Set the root password which will be used for later login into MySQL
workbench.
10) You can also install MySQL Workbench (the front-end client) from the same
downloads page.
You can also refer to this link to install MySQL Workbench on macOS:
https://www.youtube.com/watch?v=-TSFLhlGY1k
3. How to import a database (.sql) files in MySQL
Workbench?
1) Open the provided drive link and download the FramersMarketDatabase.sql file.
Drive link:
https://drive.google.com/drive/folders/1Ba8PrsQY4Jz0d35SvzFcEQl3ht4aawMF?usp=sharing
2) Now, to import the downloaded file. Open the MySQL workbench and enter the credentials.
3) Click on the symbol and create a new schema as ‘Farmers_market’ and press on Apply a
pop-up appears and click on Apply again and Finish.
4) Go to the Server as shown in the below screenshot and click on Data Import.
5) After you click on Data Import a new tab called ‘Administration-Data Import / Restore’ opens
Inside the Import from Disk:
i) Select Import from Self-Contained file and select the path of the downloaded file from
the downloads which is FarmersMarketDatabase.sql
ii) In Default Target Schema: Select the above-created schema “Farmers_market”
iii) Below to the right bottom of the page select ‘Dump Structure and Data’
6) Now, go to the next tab ‘Import Progess’ and click on ‘Start Import’
7) Once you click on the start import the import process starts and after a while importing the file
gets completed as shown below.
8) Now, to the left there is the created ‘Farmers_market’ schema. Right-click on the schema and
select “Refresh all” to see the imported tables and the data.
9) Now all the data is imported into the ‘farmers_market’ schema and you can start querying.