28 lines
501 B
Markdown
28 lines
501 B
Markdown
![]() |
---
|
||
|
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;
|