SQL

How to create database and user in MySQL

How to create database and user in MySQL

Most web hostings have GUI for database management by when we don’t have GUI it is necessary to know how to create database and user in MySQL from terminal.

Here is a simple example of how to do it in MySQL.

In ssh terminal enter theMySQL:

After successful login type following rows to create database and user in MySQL:

Where:

DB_NAME  – database name

my_user  – user for database

my_password  – password for user

One thought on “How to create database and user in MySQL

Leave a Reply

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