This article lists some of the basic MySQL commands how to create a new database, a new database user and granting privileges to a user.
How to create a new database from terminal.
The first step here is to log in as the MySQL root from terminal using the following command.
mysql -u root -p Now this will prompt for the MySQL root password.
Enter password : After entering the MySQL root password we will be able to log in to the MySQL prompt.
The next step is to create the new database.