Home  >  Article  >  Database  >  How to use mysql workbench

How to use mysql workbench

黄舟
黄舟Original
2017-08-02 15:59:05102254browse

Usage of mysql workbench: 1. Install MySQL Server and Workbench; 2. Click the [connect] button to enter the database instance; 3. View the data information and execute the SQL statement in Workbench.

How to use mysql workbench

Workbench is a graphical management tool for MySQL. It is much more convenient than the MySQL Command line client and has high practicality. So today the author will teach you how to quickly understand MySQL Workbench and use it as quickly as possible.

Recommended related mysql video tutorials: "mysql tutorial"

##1. First of all The prerequisite for using the Workbench tool is to install MySQL Server and Workbench. After completing the installation, click the icon as shown below.

How to use mysql workbench

2. After opening, we will see: MySQL connections, the author has only one connection here, that is For the local connection configured when installing MySQL Server, after we enter the password, click on the "connect" connection.

How to use mysql workbench

3. Enter the correct password, then we can enter this database instance. First we will see such an interface.

How to use mysql workbench

4. After entering this database instance, first of all we definitely want to see what databases there are in the database. Where are the tables and what fields are included in the tables. Here we can find it in "SCHEMA" on the lower right. In the author's example, it includes two databases: sys and test. There is a table called t1 in the test library, and there is only one id field in the table.

How to use mysql workbench


##5. Let’s see how Execute a simple SQL statement in Workbench. Suppose we want to modify our "t1" table and add a name field to it. Here we write our sql statement in "query", as shown in the figure below.

How to use mysql workbench


##6. Press "ctrl+enter" After executing this statement, we will see the output section below, which will display the specific execution of our query.

How to use mysql workbench


##7.Finally, find “test” Database, then left-click and select "refresh all". After refreshing, we can see our newly added field "name" in the t1 table

How to use mysql workbench

Notes

MySQL in the article is version 5.7, and the steps for other versions are similar.


For more tutorials, please refer to:

The above is the detailed content of How to use mysql workbench. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn