Skip to main content
MySQL export restore

Create MySQL database from command line

This tutorial explains how you can create MySQL user and database using command line.

First, we will update the system and install MySQL database.
We will update system and install MySQL database.
For CentOS/RHEL OS:


Now follow these steps:

When you finished MySQL installation you can log in to MySQL:

Type MySQL root password.

Create database:

Create new user and password:

Add privileges to user mysqluser on database mydatabase and exit console:

You can use this database (DB name, DB username and DB password) to install your CMS (WordPress, Joomla…) now.
You can also import database backup in your new database mydatabase and connect your application to database:

And type password for user mysqluser.

SkyHosting

Best Hosting Services: .rs domain registration, Web Hosting, VPS Servers, SSL Certificates. Visit us SkyHosting.

Leave a Reply

Your email address will not be published. Required fields are marked *