테스트 사이트 - 개발 중인 베타 버전입니다

MySQL(MariaDB) DATABASE, 사용자 생성 및 권한 추가

· 6년 전 · 4110 · 5

mysql root 접속

 

[root@localhost ~]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

 

 

DATABASE 생성

 

MariaDB [(none)]> create database dbname character set utf8mb4 collate utf8mb4_unicode_ci;
Query OK, 1 row affected (0.01 sec)

 

 

USER 생성

 

MariaDB [(none)]> create user 'dbuser'@'localhost' identified by 'dbuserpassword';
Query OK, 0 rows affected (0.00 sec)

 

 

권한부여

 

MariaDB [(none)]> grant all privileges on dbname.* to 'dbuser'@'localhost';
Query OK, 0 rows affected (0.00 sec)

 

 

마무리

 

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 5개

6년 전
그냥 추천
일단추천
추천이요.
6년 전
추천추천~~
5년 전
영어가 한글보다 많아서 추천

게시글 목록

번호 제목
16429
16424
16423
16412
16408
16407
16401
16395
16394
16391
16390
16389
16387
16386
JavaScript js playground
16382
16381
16377
16374
16372
16356
16355
16354
16353
16347
16346
16339
16338
16332
16331
16330