Close

Installing MySql and working with Workbench

[Last Updated: Jun 5, 2018]

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 version 5.7.19. (Updated Jun 2018: I also followed the same steps for the latest version 8.0.11).
Followings are the important steps during installation process:

Installation

Select 'Developer Default' and click next


Nothing to select, click next:

Click execute

After few minutes 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:

Note that if workbench is not installed in above installation (e.g. in version 8.0.11) then you have to install that separately from here.

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