MySQL Workbench is a visual tool developed by Oracle, which helps to administer MySQL Databases. It is known for being a cross-platform software that allows MySQL to run on many platforms such as Windows, Linux, and macOS.
What is MySQL?
MySQL is an open-source Relational Database Management System (RDBMS) developed by Oracle Corporation, Sun Microsystems, that uses Structured Query language(SQL) to interact with databases. You can use MySQL to store, retrieve, manipulate and process data that is in the form of tables.
Why Use MySQL?
There are various relational database management systems present in the tech world today, such as Microsoft SQL Server, Microsoft Access, Oracle, DB2, etc.
Here are some reasons why people use MySQL over other Database Management Systems.
Multiple Storage Engines
MySQL adheres to multiple storage engines, and each one of the storage engines possesses unique features, while other databases like SQL Server only support a single storage engine.
- InnoDB: It is the default storage engine fabricated with MySQL since version 5.5. It supports ACID-based transactions.
- MyISAM: Former to version 5.5, MyISAM was the default storage engine used by MySQL. It does not support ACID-based transactions.
MySQL has reported high performance compared to other database management systems because of its simplicity in design, and adherence to multiple storage engines.
The community edition of MySQL is free of cost, and the commercial edition has a licensing fee, which is cost-effective compared to other products available in the market.
MySQL runs on Windows, Linux, and macOS because of its cross-platform property.
With this, it is clear why MySQL is used. Now, you will see what MySQL Workbench exactly is and how one can use it.
What is MySQL Workbench?
MySQL Workbench is a unified cross-platform, open-source relational database design tool that adds functionality and ease to MySQL and SQL development work. MySQL Workbench provides data modeling, SQL development, and various administration tools for configuration. It also offers a graphical interface to work with the databases in a structured way.
- You can create a Graphical Model using MySQL Workbench
- MySQL Workbench provides reverse engineering for live databases to models
- MySQL Workbench offers a forward engineering model to a script/live database
MySQL Workbench - Modeling and Designing Tool
- MySQL Workbench possesses tools that allow database administrators to virtually create physical database design models that can be easily transitioned into MySQL databases using forward engineering.
- MySQL Workbench adheres to all objects such as tables, views, stored procedures, triggers, etc.
- MySQL Workbench also creates models from a target database or even imported SQL files.
MySQL Workbench - SQL Development Tool
- MySQL Workbench comes with a visual SQL editor.
- The Visual SQL editor gives developers the access to build, edit, and run queries against MySQL server databases. It has utilities for viewing data and exporting it.
- MySQL Workbench has auto-complete and color highlighters that aid in the writing and debugging of SQL statements, easily.
- Multiple queries can be run at a time, and the result is automatically displayed.
- It also saves the queries in the history panel for previewing and running it later on.
MySQL Workbench - SQL Administration Tool
MySQL Workbench makes user management much easier.
- You can view the account information of all users on the MySQL server
- MySQL Workbench gives access to add and remove users
- MySQL Workbench grants and revokes privileges
- You can modify global and database permissions on the MySQL server
- You can change passwords using MySQL
- You can audit to see who did what and when on the server
How to Install MySQL Workbench?
Moving on, you will look at how to install MySQL Workbench on Windows. The installation process is similar to other operating systems.
- Open the MySQL website on a browser. Click on the following link: MySQL Downloads.
- Select the Downloads option.
- Select MySQL Installer for Windows.
- Choose the desired installer and click on download.
- After it downloads the installer, open it.
- It will ask for permission; when it does, click Yes. The installer will then open. Now, it will ask to choose the setup type, here, select Custom.
- Click on Next. With this, you will be able to install MySQL server, MySQL Workbench, and MySQL shell.
- Open MySQL Servers, select the server you want to install, and move it to the Products/Features to be installed window section. Now, expand Applications, choose MySQL Workbench and MySQL shell. Move both of them to ‘Products/Features to be installed’.
- Click on the Next button. Now, click on the Execute button to download and install the MySQL server, MySQL Workbench, and the MySQL shell.
- Once the product is ready to configure, click on Next. Under Type and Networking, go with the default settings and select Next.
- For authentication, use the recommended strong password encryption.
- Set your MySQL Root password and click on next.
- Go for the default windows service settings and under apply configuration, click on execute. Once the configuration is complete, click on finish.
- Complete the installation. This will now launch the MySQL Workbench and the MySQL Shell.
Once MySQL Workbench is installed, select the Local instance and enter the password.
Now, you can use the MySQL query tab to write your SQL queries.
- Check the databases that are present in MySQL using the following command:
In the result grid, you can see the list of databases that are already present.
- To choose a database and display the tables in the database, execute the below queries:
Here, you must are select the sql_intro database and display the tables that are present in it.
- Display the records present in the products table.
Select * from products;
MySQL Workbench is widely used to handle structured data. In this tutorial, you learned the steps to install MySQL Workbench on Windows. You also explored a few commands on the query editor.
Do you have any questions regarding this ‘MySQL Workbench’ tutorial? If you do, then please put it in the comments section. Our team will help you solve them, at the earliest!
To learn more on SQL, check out our course on SQL Training.