Cara login ke MySQL, mysql -U root -P , -U root adalah user untutk root, -P adalah masuk dengan menggunakan password jika ada. Untuk lebih jelasnya, seperti pada perintah berikut:
C:\xampp\mysql\bin>mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 64
Server version: 10.3.15-MariaDB mariadb.org binary distribution
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
Masuk ke database
MariaDB [(none)]> use db1;
Database changed
Malihat table
MariaDB [db1]> show table;
+---------------+
| Tables_in_db1 |
+---------------+
| kota |
| migrations |
| propinsi |
+---------------+
3 rows in set (0.001 sec)