MySQL workbench tutorial
What is MySQL workbench
MySQL Workbench is GUI based tool to work with MySQL Servers. You may use this for Server Administration, for creating Entity Relationship Diagrams and for SQL Development (run queries etc).
This tutorial discusses how to perform basic MySQL Administration tasks using MySQL Workbench.
Installing MySQL workbench
To install MySQL Workbench on Linux (we used Ubuntu), you may run the following command from your terminal.
sudo apt-get install MySQL-workbench
MySQL Workbench version installed at the time of writing this tutorial is 5.2.40.
On Windows, if you are installing MySQL Community Server 5.6, MySQL Workbench is installed in the installation process of the server itself. Download the appropriate .msi file from the MySQL download page, run it and follow the instructions.
After installing it successfully, when you start, you get a window like following.
Pictorial presentation of when you open MySQL Workbench
You may see that there are three sections - SQL Development, Data Modelling, and Server Administration.
Create a new database connection
The following slideshow shows you how to create a new connection using MySQL Workbench.
Create Database and table
Once the connection is created, you may use that connection to enter SQL Editor to do SQL Development tasks like creating/modifying/deleting modify database and tables, running SQL queries etc.
Edit table data
With MySQL Workbench you can select a connection, a schema and table under that to edit table data.
Edit SQL Scripts
Click on Edit SQL Scripts to edit an existing SQL script.
You can manage existing connections using MySQL Workbench.
Click on Manage Connections using the link and then from the windows as shows above, you can create a new connection, delete an existing connection, create a clone of an existing connection and change parameters like name, method, username, port, password, default schema etc. of an existing connection.
Using this section, you can create a new Entity Relationship models using various components available, creating EER from an existing database, from a SQL Script and open an existing one.
The following slideshow shows how to create an EER from an existing database.
You can create new Server Instance and manage existing Server Instances on one hand and on the other you can manage security, that is creating and managing user and provide them with permissions to perform various tasks on MySQL objects and manage import and export data and structure.
Import & Export
We have covered the basic tasks you can perform with MySQL Workbench in this tutorial. Hopefully, this will be helpful to you and get you started with MySQL Administration.
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework