Database Basic Commands in Mysql Workbench

Rikzan Fernanda
3 min readSep 27, 2021

Hello everyone, in the last article we have learned about what is MySQL Workbench and installation. Now, we will learn basic commands like create connection, create the database, create the table, insert row, update, and delete row.

Create Connection

  • ensure that you have turned on the MySQL server in your computer
  • open your MySQL Workbench
  • right-click the localhost, and choose Edit Connection
  • we will see the default option for connection, but if you have changed the setting, such as username and password, you can change the username and password as well in this setting connection
  • you can click the Test Connection bellow to check the connection. If the success you can close. but if not probably you have changed the setting.
  • then, click again the localhost with left-click with your mouse. It will look like below

Create Database

  • click the button shown below
  • change the name of schema/database as you want, I change it with name company, then click Apply button at the bottom
  • next, click Apply, and finish
  • we will see the company database we created

Create Table

  • right-click the Tables and choose Create Table
  • change the table name, I change with name employee, create column name. If finished click Apply at the bottom
  • Apply
  • Finnish
  • if successful we will see an employee table like this

Insert

  • click the button shown below
  • you can insert a row in 2 ways, you can directly click the table and fill it out with the value or you can go to form editor the beside
  • then click Apply button at the bottom

Update

  • for an update, you can directly click the column you want to edit, and click Apply button at the bottom

Delete

  • select the row, and click the delete button shown below, or right-click and choose Delete Row(s)
  • then click Apply button at the bottom to save

Congratulation!
We have learned about basic commands in MySQL Workbench, I hope this article is useful.
Thank you for your time to reading this article.

--

--

Rikzan Fernanda
0 Followers

Web developer from Indonesia. I like to share my knowledge about programming especially web app.