MySQL follows the client-server model. The mysqld daemon runs as a server process; you interact with it through the mysql command-line client or a GUI tool such as MySQL Workbench or phpMyAdmin.

Install MySQL on Ubuntu and secure the installation:

sudo apt install mysql-server
sudo mysql_secure_installation

Connect to the MySQL server as root:

sudo mysql -u root -p

Once inside the MySQL shell, list databases, select one, and show its tables:

SHOW DATABASES;
USE myapp;
SHOW TABLES;
DESCRIBE users;

Create a database and a dedicated user for your application (never use root in production):

CREATE DATABASE myapp CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 's3cr3t';
GRANT ALL PRIVILEGES ON myapp.* TO 'appuser'@'localhost';
FLUSH PRIVILEGES;