Creare Un DataBase
Per creare un DB usando la CLI si procede nel modo seguente:
al prompt di shell digitiamo mysql -u root -p
il server risponderà chiedendovi la password dell'utente root di MySQL/MariaDB
una volta digitata la password il server SQL mostrerà il suo prompt rimanendo in attesa
Your MariaDB connection id is 779
Server version: 10.5.9-MariaDB-1 Debian buildd-unstable
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Possiamo quindi creare il DB mio_db digitando quanto segue:
possiamo controllare che tutto sia andato bene utilizzando uno SHOW BADABASES se mio_db appare in tabella possiamo ritenerci soddisfatti
+--------------------+
| Database |
+--------------------+
| information_schema |
| mio_db |
| mysql |
| performance_schema |
+--------------------+