리자

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

· 2019-04-01 (월) 11:53:16 · 4865 · 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개

2019-04-02 (화) 14:44:20
그냥 추천
일단추천
추천이요.
2019-11-01 (금) 20:49:07
추천추천~~
영어가 한글보다 많아서 추천
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
MySQL 20-02-13 조회 3,502
기타 20-01-29 조회 2,656
PHP 20-01-26 조회 3,330
기타 20-01-19 조회 1만
웹서버 20-01-18 조회 3,805
기타 20-01-15 조회 2,663
PHP 20-01-12 조회 4,247
기타 20-01-12 조회 2,695
웹서버 20-01-07 조회 3,544
node.js 20-01-06 조회 2,833
PHP 19-12-19 조회 4,337
기타 19-12-05 조회 2,842
JavaScript 19-12-02 조회 3,115
웹서버 19-11-19 조회 4,980
JavaScript 19-11-05 조회 3,417
JavaScript 19-11-04 조회 2,570
JavaScript 19-11-01 조회 2,681
JavaScript 19-10-31 조회 2,724
PHP 19-10-29 조회 2,750
기타 19-10-26 조회 3,622
JavaScript
[JavaScript]
19-10-17 조회 2,721
JavaScript 19-09-25 조회 2,947
jQuery 19-09-24 조회 2,709
PHP 19-09-23 조회 3,450
기타 19-09-08 조회 3,249
PHP 19-09-03 조회 5,431
기타 19-08-10 조회 2,751
정규표현식 19-08-08 조회 3,004
정규표현식 19-08-05 조회 3,353
웹서버 19-08-05 조회 4,837