MySQL(MariaDB) DATABASE, 사용자 생성 및 권한 추가 > 정보공유

본문 바로가기

정보공유

일반글
MySQL

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

페이지 정보

게시물QR코드

본문

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)

댓글목록

등록된 댓글이 없습니다.

  • Addr.부산광역시 동구 중앙대로 319, 9층 L4호(초량동, 부산YMCA빌딩) Email. gnuwiz@naver.com
  • BR. 625-68-00172 TRC. 2019-부산해운대-1186 TEL. 0507-1382-2790
All rights reserved.