[OPTIONAL] Install MySQL locally

if needed, you can install MySQL locally here

1

Installing on MacOS

To install on MacOS, you can use Brew

brew install mysql
2

Start MySQL

Then to start MySQL, use

brew services start mysql

NOTE: If you are connecting to a remote MySQL instance that is already running, you shouldn’t need to uninstall it locally.

If you have installed locally using defaults, you will have MySQL running with these configuration properties:

	Host: localhost
	Port: 3306
	User: root
	Password:  <empty, no password>

Add A Connection To MySQL

Tell Eve you want to connect to MySQL, and provide your host, port, user, and password

Copy the prompt below to follow along

Eve, add a connection to MySQL called “mysql_demo”, host: localhost, port: 3306, user: root, and the password is “” (no password needed), and allow all bots to access it.

Eve adding a database connection to MySQL

Clicking “Database Connections” in the Genesis GUI will show you that it has been added

Click Database Connections

mysql_demo and other databases connected appear here

[OPTIONAL] Create Sample Data

If you already have data in MySQL, you can proceed to the next section to harvest and analyze your data.  If your MySQL is empty, you can have Eve create some sample data for you

Copy the prompt below to follow along

Create a demo database in this new connection called PETS, with tables DOGS and CATS. Add several columns to each database to track data about the respective types of pets names, breeds, etc. Then insert 5 sample rows in each table.

Eve creates synthetic data for you to use

NOTE: It’s ok if Eve has to retry some steps or if she encounters issues, she should be able to resolve them on her own.

Once your data is created, you can ask Eve to show you some of it.

Copy the prompt below to follow along

Show me 3 rows from dogs and 3 rows from cats

Eve showing the first 3 rows of the newly created synthetic dataset

Adding MySQL To The Harvest

Tell Eve to add your MySQL connection and the databases you want to use to the harvest.

Example: if you just created the databases above

Copy the prompt below to follow along

Add the PETS database from the msql_demo connection to the harvest.

Eve adds the new PETS database from the prompt above

After a few minutes, you should see the result on the Configuration / Harvest Summary screen

Harvester Status is where you can see all of the data sources being harvested

You can ask Eve questions about your data in MySQL once the database connection appears on the Harvester Status page.

Copy the prompt below to follow along

Search mysql for data on pets, and show me how many of each kind of pet I have.

Eve shows a breakdown of the pets in the database

Removing The Connection

 You also have the option to remove the connection.

NOTE: This will also remove related harvest information

Copy the prompt below to follow along

remove the connection to the PETS data