Bootstrap FreeKB - mySQL / MariaDB - Create a new database
mySQL / MariaDB - Create a new database

Updated:   |  mySQL / MariaDB articles

The create <database name> command can be used to create a new database. You will first need to log into your MariaDB or mySQL server or configure passwordless authentication and then use the -e command line option and the user must have the Create_priv.

create database mydatabase;

 

The show databases command can then be used to list the databases.

show databases;

 

Something like this should be returned.

+--------------------+
| Database           |
+--------------------+
| information_schema |
| mydatabase         |
| mysql              |
| performance_schema |
+--------------------+

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 6643d3 in the box below so that we can be sure you are a human.