리자

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

· 2019-04-01 (월) 11:53:16 · 4830 · 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에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
PHP 19-06-24 조회 3,167
PHP 19-06-09 조회 3,782
MySQL 19-04-01 조회 4,831
jQuery 19-03-20 조회 4,226
node.js 19-02-12 조회 3,316
node.js 19-02-12 조회 3,048
node.js 19-02-12 조회 3,316
node.js 19-02-07 조회 3,281
node.js 19-02-07 조회 3,035
node.js 19-02-07 조회 3,167
node.js 19-02-04 조회 2,904
node.js 19-02-04 조회 2,893
node.js 19-02-04 조회 3,325
node.js 19-01-31 조회 2,436
node.js 19-01-31 조회 2,582
node.js 19-01-31 조회 3,077
node.js 19-01-28 조회 2,841
node.js 19-01-28 조회 2,921
node.js 19-01-28 조회 2,745
node.js 19-01-22 조회 3,088
node.js 19-01-22 조회 2,839
node.js 19-01-22 조회 3,274
node.js 19-01-16 조회 2,710
node.js
[node.js]
19-01-16 조회 2,621
node.js 19-01-16 조회 9,295
node.js 19-01-12 조회 4,364
node.js 19-01-12 조회 2,984
node.js 19-01-12 조회 3,111
node.js 19-01-11 조회 2,682
node.js 19-01-11 조회 3,999