Skip to content

About

A collection of useful MariaDB setup and configuration commands

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

🛠️ MariaDB / MySQL Setup Tutorial

A quick reference guide for creating databases, users, and managing privileges in MariaDB or MySQL.


📘 1. Create a New Database

CREATE DATABASE mydb;

Replace mydb with your preferred database name.


👤 2. Create a New User

CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypassword';

Replace myuser and mypassword with your desired username and password.


🔑 3. Grant Full Access to the User

GRANT ALL PRIVILEGES ON mydb.* TO 'myuser'@'%';
FLUSH PRIVILEGES;

Grants full control of the database mydb to the user myuser.


👥 4. List All MySQL Users

SELECT User, Host FROM mysql.user;

Useful for verifying that your new user was created successfully.


⚙️ 5. View Current Database Connection Details

STATUS;

Displays server version, connection info, and other useful details.


✅ End of Commands

Simple and clean setup commands for initializing a MariaDB / MySQL environment.

About

A collection of useful MariaDB setup and configuration commands

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors