0% found this document useful (0 votes)
9 views4 pages

MySQL Workbench Upload Guide

This document provides a step-by-step guide for uploading the MavenFuzzyFactory database into MySQL Workbench using three methods: the recommended Data Import Wizard, manual SQL script execution, and command line for power users. It includes prerequisites, detailed instructions for each method, verification queries, and troubleshooting tips for common errors. Users are advised to ensure MySQL Server is running and to set the mavenfuzzyfactory schema as default after importing.

Uploaded by

abdelrahim.ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

MySQL Workbench Upload Guide

This document provides a step-by-step guide for uploading the MavenFuzzyFactory database into MySQL Workbench using three methods: the recommended Data Import Wizard, manual SQL script execution, and command line for power users. It includes prerequisites, detailed instructions for each method, verification queries, and troubleshooting tips for common errors. Users are advised to ensure MySQL Server is running and to set the mavenfuzzyfactory schema as default after importing.

Uploaded by

abdelrahim.ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MavenFuzzyFactory

How to Upload the Database into MySQL Workbench

Step-by-step guide · MySQL Workbench 8.x

Overview

This guide walks you through three ways to load the MavenFuzzyFactory database into MySQL Workbench so
your hackathon team can start querying immediately. Method A (Import Wizard) is the easiest and
recommended for most users.

Prerequisites

Requirement Where to get it

MySQL Community Server 8.x [Link]/downloads/mysql

MySQL Workbench 8.x [Link]/downloads/workbench

MavenFuzzyFactory .sql dump file Provided by your hackathon organiser

~50 MB free disk space Local machine

■ Make sure MySQL Server is running before opening Workbench. On Windows you can check via Services →
MySQL80. On macOS/Linux use: sudo systemctl status mysql

Method A — Data Import Wizard (Recommended)

The easiest way to load a .sql dump file. No command line needed — everything is done inside MySQL
Workbench.

1 Open a connection — Launch MySQL Workbench. On the home screen, double-click your local
connection (usually Local instance 3306). Enter your root password if prompted.

2 Open the Import Wizard — In the top menu bar click Server → Data Import. The Data Import /
Restore panel will open on the right side.
3 Select import source — Under Import Options, choose Import from Self-Contained File. Click
the folder icon and browse to your [Link] file.

4 Set the target schema — Under Default Schema to be Imported To, click New… and type
mavenfuzzyfactory. Click OK. This creates the schema automatically.

5 Start the import — Click Start Import in the bottom-right corner. A progress log will appear — wait
until you see Import completed.

6 Verify the import — In the left Navigator panel click the refresh icon (■). Expand
mavenfuzzyfactory → Tables. You should see all 6 tables listed.

✓ After import, run a quick sanity check: right-click any table → Select Rows. You should see data immediately.

Method B — Run the SQL Script Manually

Use this method if the Import Wizard fails or if you received the database as a raw .sql script (rather than a
mysqldump file).

1 Create the schema first — Click the Create a new schema icon in the toolbar (cylinder with a +
sign), name it mavenfuzzyfactory, set charset to utf8mb4, and click Apply.

2 Set it as default — Right-click mavenfuzzyfactory in the Navigator and choose Set as Default
Schema. The schema name turns bold.

3 Open the SQL file — Go to File → Open SQL Script… and select your .sql file. It will open in a
new query tab.

4 Run the script — Click the lightning bolt icon (Execute Script) or press Ctrl + Shift + Enter.
Watch the Output panel at the bottom for any errors.

5 Verify — Refresh the Navigator and confirm all 6 tables appear under mavenfuzzyfactory.

Method C — Command Line (Power Users)

Fastest method if you are comfortable with a terminal. Works on Windows (Command Prompt / PowerShell),
macOS, and Linux.

Step 1 — Create the schema

mysql -u root -p -e "CREATE DATABASE mavenfuzzyfactory CHARACTER SET utf8mb4;"

Step 2 — Import the dump file


mysql -u root -p mavenfuzzyfactory < /path/to/[Link]

Replace /path/to/ with the actual folder where your .sql file lives. On Windows use backslashes or drag-and-drop the file into the
terminal.

Step 3 — Verify from the command line

mysql -u root -p mavenfuzzyfactory -e "SHOW TABLES;"

Expected output: 6 rows listing all tables.

■ On Windows, make sure [Link] is in your PATH. Default location: C:\Program Files\MySQL\MySQL
Server 8.0\bin

Quick Verification Queries

Run these in MySQL Workbench to confirm the data loaded correctly.

Check all tables exist

USE mavenfuzzyfactory;
SHOW TABLES;

Check row counts

SELECT 'website_sessions' AS tbl, COUNT(*) AS rows FROM website_sessions


UNION ALL
SELECT 'website_pageviews', COUNT(*) FROM website_pageviews
UNION ALL
SELECT 'orders', COUNT(*) FROM orders
UNION ALL
SELECT 'order_items', COUNT(*) FROM order_items
UNION ALL
SELECT 'order_item_refunds',COUNT(*) FROM order_item_refunds
UNION ALL
SELECT 'products', COUNT(*) FROM products;

Check date range

SELECT MIN(created_at) AS first_record,


MAX(created_at) AS last_record
FROM website_sessions;

Sample a session

SELECT * FROM website_sessions LIMIT 5;


Troubleshooting

Error Likely cause Fix

Access denied for user 'root' Wrong password Reset password via mysqladmin or
reinstall MySQL

ERROR 1049: Unknown Schema not created yet Create it first (Method B Step 1)
database

Packet too large / Default limit too small for the Add --max_allowed_packet=64M to
max_allowed_packet dump the mysql command

Import Wizard stuck at 0% File path has spaces or special Move the .sql file to a simple path like
characters C:\sql\

Tables exist but are empty Script ran without USE Re-run with the correct default schema
statement set (Method B Step 2)

✓ Once the database is loaded, set mavenfuzzyfactory as your default schema (right-click → Set as Default
Schema) so you can write queries without the USE statement.

You might also like