MySQL(MariaDB) DATABASE, 사용자 생성 및 권한 추가
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개
게시판 목록
개발자팁
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5126 | PHP |
|
3년 전 | 1800 | |
| 5125 | PHP | 3년 전 | 1606 | ||
| 5124 | PHP | 3년 전 | 2122 | ||
| 5123 | OS | 3년 전 | 1403 | ||
| 5122 | OS | 3년 전 | 1321 | ||
| 5121 | OS | 3년 전 | 1423 | ||
| 5120 | OS | 3년 전 | 1299 | ||
| 5119 | PHP |
|
3년 전 | 1151 | |
| 5118 | PHP | 3년 전 | 1368 | ||
| 5117 | Mobile |
|
3년 전 | 1409 | |
| 5116 | PHP | 3년 전 | 2297 | ||
| 5115 | MySQL |
welcome
|
3년 전 | 2910 | |
| 5114 | OS | 3년 전 | 2010 | ||
| 5113 | JavaScript | 3년 전 | 1543 | ||
| 5112 | PHP | 3년 전 | 1562 | ||
| 5111 | 기타 |
|
3년 전 | 1303 | |
| 5110 | PHP | 3년 전 | 4547 | ||
| 5109 | PHP | 3년 전 | 1583 | ||
| 5108 | 기타 |
|
3년 전 | 12178 | |
| 5107 | 기타 |
|
3년 전 | 2414 | |
| 5106 | 기타 |
|
3년 전 | 6325 | |
| 5105 | 기타 |
|
3년 전 | 3700 | |
| 5104 | 기타 |
|
3년 전 | 1508 | |
| 5103 | JavaScript | 3년 전 | 1700 | ||
| 5102 | 기타 |
|
3년 전 | 1274 | |
| 5101 | 기타 |
|
3년 전 | 1471 | |
| 5100 | 기타 |
|
3년 전 | 1310 | |
| 5099 | 웹서버 | 3년 전 | 2183 | ||
| 5098 | PHP | 3년 전 | 1334 | ||
| 5097 | PHP |
|
3년 전 | 1992 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기