Installing MySql and working with Workbench

[Updated: Sep 16, 2017, Created: Sep 15, 2017]

Database 

This tutorial walks through important steps to install MySql Community Server on Windows 10. We will also do necessary getting started steps with MySql Workbench.

Download MySql Community Server

Download MySql community server and run the installer. I downloaded the latest version 5.7.19. Followings are the important steps during installation process:

Installation

Select 'Developer Default' and click next


Nothing to select, click next:

Click execute

After few mins of upgrade process:

Enter easy to remember password e.g. 1234 and click next

Enter user 'root' and your password '1234' and click on check:

Workbench

It will launch automatically or you can start it from windows start menu:

Select 'Local instance MySql57' in the grey box and enter you password '1234':

Create your new schema by clicking the option in the right click menu as shown below:

Double click on schema name that you just created, it will become bold. Now select 'Query 1' tab and enter following script. Execute it by clicking the yellow 'lightning' icon.

The script:

CREATE TABLE PERSON(
ID BIGINT  PRIMARY KEY AUTO_INCREMENT,
FIRST_NAME VARCHAR(255),
LAST_NAME VARCHAR(255),
ADDRESS VARCHAR(255)
);

Connection details

Check your connection details by clicking menu 'Database/Connect to Database'

Connecting via JDBC

If you want to connect the database in Java then you can use following connection url:

jdbc:mysql://localhost:3306/my_schema