The Series of MySQL -2- MySQL Workbench - EP 02_03
HI Hi, Greetings!
Happy January
Hi Everyone,
Today, I would like to share with you an article about the second episode of Series of MySQL (MySQL Workbench), and the content is given below.
a. MySQL Workbench environment deployment
b. MySQL Workbench Editions
c. MySQL Workbench Administration Tool
d. MySQL Workbench Manager (Create, Alter, Drop Delete)
e. MySQL Workbench Database Export and Import
MySQL Workbench Administration Tool
The Administration Tool is critical to the security of the company's data. We'll go through user administration, server settings, database backup and restore, server logs, and more in this section.
Administration of Users
It's a graphical tool for managing users associated with an active MySQL Server instance. You may create and manage user accounts here, as well as grant and remove privileges, examine user profiles, and set password expiration dates.
Configuring of the Server
It enables the Server to be configured in a more complex manner. It includes complete information on the Server and status variables, as well as the number of threads, buffer allocation size, fine-tuning for best performance, and more.
Backup and recovery of databases
It's a graphical tool for importing and exporting MySQL dump files. SQL scripts for constructing databases, tables, views, and stored procedures are included in the dump files.
Logs from the server
Each connection tab shows log information for the MySQL Server. There is an additional tab for the general error logs for each connection tab.
Dashboard of Performance
This page displays a statistical representation of the Server's performance. You may access it by going to the Navigation menu and selecting Dashboard from the Performance section.
MySQL Workbench Manager (Create, Alter, Drop Table)
Database
Table
Data Rows
1. Database
In this section, we'll look at how to use the MySQL Workbench to create, alter, and drop a database. Let's take a look at each one individually.
Create a database
Follow these steps to establish a database:
1. Log in to MySQL Workbench with your username and password. Then select the Schema menu from the Navigation tab. You may examine all of the databases that have been generated earlier in this section.
2. To create a new database, right-click beneath the Schema menu and choose Create Schema, or click the database icon (red rectangle) as shown in the screenshot.
3. The new Schema window appears on the screen. Use the default Collation and enter the new database name (for example, myDB). Collation is a technique for storing specific data characters, which is particularly beneficial for storing foreign languages. Now, as indicated on the screen below, click the Apply button:
4. To create a new database, open a new popup window and click Apply->Finish.
5. After the database has been successfully created, you can view it in the Schema menu. If you don't see it, go to the Schema menu and click the refresh icon.
6. Select the myDB database and click the I button to obtain additional information about the database. Table, Column, Functions, Users, and many more choices are displayed in the information box.
7. Although MySQL Workbench does not allow us to rename the database, we may add, edit, and delete tables and data rows from it.
Database Drop (Remove )
1. To delete a database, pick it, right-click it, and choose Drop Schema from the drop-down menu. The screen that shows next is:
2. In the popup window, select Drop Now to erase the database, including tables and data rows, from the database server.
2. Table
Using the MySQL Workbench, we'll explore how to create, alter, and drop a table in this section. Let's take a look at each one individually.
Create a Table
To make a table, take these steps:
1. Log in to MySQL Workbench with your username and password. Then select the Schema menu from the Navigation tab. You may examine all of the databases that have been generated earlier in this section. A new database can also be created.
2. Double-click on the newly formed database to reveal the sub-menu beneath it. Tables, Views, Functions, and Stored Procedures are the submenus under the database, as illustrated in the screenshot below.
3. Right-click on the Tables sub-menu and choose the Create Table option. To make a table, click the build a new table icon (shown in red rectangle).
4. To build a table, fill in all of the details on the new table screen. We'll use the default collation and engine and enter the table name (for example, student).
5. Fill in the column details by clicking inside the main box. Primary Key(PK), Not Null (NN), Unique Index (UI), Binary(B), Unsigned Data type(UN), Auto Incremental (AI), and so on are all included in the column name. The next screen discusses it in further detail. After you've completed all of the fields, click the Apply button.
6. The SQL statement window will open as soon as you click the Apply button. To execute the statement, click the Apply button once more, and then the Finish button to save the modifications.
7. Select the database that contains the newly created table from the Schema menu, as shown in the screen below.
Alter Table
To alter a table, follow these steps:
1. Select the table you wish to change, then click the "i" button to bring up the screen below.
2. Modify the column name, data type, and other table settings on the above screen.
Drop a Table
1. To delete a table, pick it, right-click it, and choose Drop Table from the context menu. The screen that shows next is:
2. In the popup window, select Drop Now to destroy the table from the database immediately.
3. Data Rows
In this section, we'll look at how to use the MySQL Workbench to insert, read, update, and delete data rows. Let's take a look at each one individually.
1. Log in to MySQL Workbench with your username and password. Then select the Schema menu from the Navigation tab. Using MySQL Workbench, we successfully established a database (mydb) and a db table.
2. Select the table, and the table icons appear when we move the mouse pointer over the student table. Click the table to open a new window with the MySQL query in the upper portion and the data rows in the lower section.
3. To input a data row, choose the appropriate column and type the data value. The process of inserting data values into rows is identical to that of using a Microsoft Excel Worksheet.
4. To save the data rows, click the Apply->Apply>Finish button after entering them.
5. We can also update or modify the previously saved data rows in the same way. After you've made your changes, click the Apply button to save them. It will create a SQL update statement to save the database changes.
Data Rows - Delete
1. To delete a single data row from a table, pick the data row, right-click on the right icon in front of the row, and choose Delete Row(s).
2. To save changes to the database, click the Apply->Apply->Finish button.
You are welcome to like and leave feedback in the comment area.
Link:
EP 02_01:
The Series of MySQL -2- MySQL Workbench - EP 02_01
EP 02_02:
The Series of MySQL -2- MySQL Workbench - EP 02_02
EP 02_04:
The Series of MySQL -2- MySQL Workbench - EP 02_04
Source:
· https://www.w3schools.com/mySQl/default.asp
· https://www.mysqltutorial.org/mysql-basics/
M M Zaheer Hussain
Stay Safe!