Access MySQL

There are three main ways in which you can access MySQL:

  • using the command line – you can access your MySQL server using the mysql command. You need to provide the username and password.

mysql command line

Once inside the MySQL command-line interface, you can execute various commands to manipulate your databases and tables:

cli example

  • using MySQL Workbench – this is a GUI tool that enables you to manage your databases. This application enables you to connect to multiple servers and features a built-in query tool and command shell:

mysql workbench

  • phpMyAdmin – a tool written in PHP that enables you to a MySQL database server from a user-friendly environment:

phpmyadmin

All SQL commands are the same, regardless of the interface.
Geek University 2021