Skip to content

AeroXDevs/MariaDB-Setup-Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published