DEV Community

Aashutosh Poudel
Aashutosh Poudel

Posted on

3 2

Some useful MySQL/MariaDB commands to create and provide access to a database.

Login to MariaDB with:

mysql.exe -u root -p <your-root-password>
Enter fullscreen mode Exit fullscreen mode

If your root account doesn't have a password omit the -p option.

Create database with:

create database database_name;
Enter fullscreen mode Exit fullscreen mode

Grant all access to the user with:

grant all on database_name.* to 'root'@'localhost';
Enter fullscreen mode Exit fullscreen mode

If you are logged in with a different user change root to your username accordingly.

Top comments (0)

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay