added first cheatsheets
This commit is contained in:
27
Cheatsheets/mariadb.md
Normal file
27
Cheatsheets/mariadb.md
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
title: mariadb
|
||||
description:
|
||||
published: true
|
||||
date: 2023-04-28T02:38:18.678Z
|
||||
tags:
|
||||
editor: markdown
|
||||
dateCreated: 2023-04-28T02:22:37.379Z
|
||||
---
|
||||
|
||||
# MariaDB
|
||||
|
||||
create database DATABASE;
|
||||
|
||||
create user USER@localhost identified by 'PASSWORD';
|
||||
grant all privileges on DATABASE.* to USER@localhost;
|
||||
|
||||
drop user USER@localhost;
|
||||
drop database DATABASE;
|
||||
|
||||
show databases;
|
||||
use mysql; select user from user;
|
||||
|
||||
mariadb -u USER -p DATABASE < backup.sql
|
||||
mariadb_dump -u USER -p DATABASE > backup.sql
|
||||
|
||||
flush privileges;
|
||||
Reference in New Issue
Block a user