In our previous post, we demonstrated steps to install MariaDB Server on Ubuntu, in this article, we are going to show how to create database in MySQL/MariaDB. We are going to talk about DDL(Data Definition Language), how to create tables and authorize users to access them.
Start your mariadb-server and follow the steps
To list all the databases in a server.
To connect to your database
Once you have selected your database, use following to create user
To create a user that can connect from any host, use the '%' wildcard as a host part:
No you can login to your MariaDB using the new user and password
Start your mariadb-server and follow the steps
Creating Databases, Tables, and Authorized Users
Step 1: Connect to your mariadb-server and run below sql. This can be done via mysql client or any other tools like Heidisql, phpmyadmin etc. This is going to create a new database in your server.
Check if the database already exists and createTo list all the databases in a server.
To connect to your database
Once you have selected your database, use following to create user
To create a user that can connect from any host, use the '%' wildcard as a host part:
No you can login to your MariaDB using the new user and password
No comments:
Post a Comment