DEV Community

Aashutosh Poudel
Aashutosh Poudel

Posted on


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)

An Animated Guide to Node.js Event Loop

Node.js doesn’t stop from running other operations because of Libuv, a C++ library responsible for the event loop and asynchronously handling tasks such as network requests, DNS resolution, file system operations, data encryption, etc.

What happens under the hood when Node.js works on tasks such as database queries? We will explore it by following this piece of code step by step.