To create a database from a script in MySQL:
- Open a Query tab in MySQL Workbench
- Run a
CREATE DATABASEorCREATE SCHEMAstatement to create the database (example below)
This will create a new database.

To create a database from a script in MySQL:
CREATE DATABASE or CREATE SCHEMA statement to create the database (example below)This will create a new database.

To generate a script from a diagram in MySQL Workbench:
To create a new database diagram using MySQL Workbench:
The diagram will be created. You can rearrange the tables to a more suitable layout by clicking and dragging.
To view MySQL status and system variables via MySQL Workbench, click on Status and System Variables under the Management tab in the left navigation pane.

This launches the Status and System Variables screen.
To check user privileges in MySQL Workbench, click Users and Privileges on the Management tab of the left navigation pane:

This opens the Users and Privileges screen on the Login tab.
You can use MySQL Workbench to view current connections in MySQL either by query or by GUI.
Screenshots below.
To check the status of a MySQL server using the MySQL Workbench GUI:
The Server Status window will appear, displaying the server’s status and related information:
MySQL Workbench is a graphical tool for working with MySQL.
MySQL Workbench provides an easy to use interface for performing the many tasks involved when working with databases. It integrates SQL development, administration, database design, creation and maintenance into one visual integrated development environment.
MySQL Workbench is similar to SQL Server’s SSMS, which is used for administering SQL Server.
An orphaned record is a record whose foreign key value references a non-existent primary key value.
Orphaned records are a concept within database relationships. If a row in a related table references a non-existent row in the primary table, it is said to be an orphaned row. This is because it has no “parent” with which its data is associated with. The terms orphaned row and orphaned record tend to be used interchangeably, even though there’s a subtle difference between a row and a record.
Referential integrity refers to the accuracy and consistency of data within a relationship.
In relationships, data is linked between two or more tables. This is achieved by having the foreign key (in the associated table) reference a primary key value (in the primary – or parent – table). Because of this, we need to ensure that data on both sides of the relationship remain intact.
So, referential integrity requires that, whenever a foreign key value is used it must reference a valid, existing primary key in the parent table.