Create a Database with MariaDB Updated on October 22, 2021 by Christopher Maiorana 2 Minutes, 43 Seconds to Read In this article, you will learn how to create a new database with MariaDB. This is going to be the same process as creating a MySQL database, so those of you familiar with MySQL maintenance should have no problem switching over to MariaDB. If you have not done so already, you should read our tutorial on how to install MariaDB as a replacement for MySQL. How to Create a New MariaDB Database Using cPanel How to Assign a Database UserAssign Privileges to the New User How to Create a MariaDB Database on the Command Line How to Create a New MariaDB Database Using cPanel For most users, the easiest way to create a new MariaDB database would be through the familiar cPanel interface. Log into cPanelUnder Databases click MySQL Databases In the Create New Database field, fill in a name for your new database Click Create Database That’s it. We have now created a MariaDB database in cPanel. You should see a success message indicating that the database was created successfully. If you notice an error, or do not see the database you created, you may have a limit on how many databases you can create or there may be a system error. In the latter case you can contact live support for assistance. How to Assign a Database User To use the database you have just created, you must create and assign a user with privileges to manage it. To do so, follow the same steps as above, but scroll down past the database creation until you see the heading: MySQL Users. Under Add New User, fill in a username, a password, and then click Create User. Assign Privileges to the New User The new user will not have the power to do anything if you do not give them the necessary privileges to make changes. In order to do this, scroll down further on the same page as above. Under the section headed Add User To Database. Select the database and user under their respective field. On the next screen, select the box for All Privileges and click Make Changes. How to Create a MariaDB Database on the Command Line Through the steps below, you can learn to create MariaDB databases on the command line. If you are familiar with MySQL commands, you’ll notice this one is the same. To start, log into your server using SSH. Then, you can log into the MariaDB command prompt: mysql -u <username> -p Replace <username> with your actual username and provide your password. This can be the database user previously created, your cPanel user, or the root user (if you have a VPS). For example: mysql -u root -p To create a database, use the “create database” command as follows: CREATE DATABASE <database_name>; Of course, replace <database_name> with the name of the database you are creating. The user you have logged in as must have CREATE privileges assigned in order to use the CREATE DATABASE function. Now that you have created a database in two different ways, you can choose whichever method works best for you. If you have any trouble, drop us a question, and we will be happy to help. Scalable VPS Infrastructure, Fully Managed When shared hosting can't handle your traffic, VPS delivers dedicated resources that scale with demand. Our team manages the technical complexity while you manage your business. NVMe Storage High-Availability Ironclad Security Premium Support VPS Hosting Share this Article CM Christopher Maiorana Content Writer II Christopher Maiorana joined the InMotion community team in 2015 and regularly dispenses tips and tricks in the Support Center, Community Q&A, and the InMotion Hosting Blog. More Articles by Christopher Related Articles How To Create a PHP Redirect (301, 302, and Dynamic Redirect Examples) Connect to SFTP for Shared Hosting Accounts Using FileZilla FTP Basics for Dedicated Servers How to Install Jekyll and Launch a New Site How to Host AI-Prompt Generated Websites on Shared Hosting What is your default PHP.ini file? Getting Started Guide: FTP Configuring your site in WS_FTP Schedule Social Media Posts With Buffer FTP Error – 421 Too Many Connections