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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5246 | node.js |
swallow
|
2년 전 | 1100 | |
| 5245 | PHP |
swallow
|
2년 전 | 2522 | |
| 5244 | PHP |
swallow
|
2년 전 | 1282 | |
| 5243 | JavaScript |
swallow
|
2년 전 | 682 | |
| 5242 | node.js |
swallow
|
2년 전 | 664 | |
| 5241 | node.js |
swallow
|
2년 전 | 773 | |
| 5240 | MySQL |
swallow
|
2년 전 | 799 | |
| 5239 | MySQL | 2년 전 | 775 | ||
| 5238 | JavaScript | 2년 전 | 976 | ||
| 5237 | 웹서버 |
swallow
|
2년 전 | 3984 | |
| 5236 | PHP |
swallow
|
2년 전 | 897 | |
| 5235 | PHP |
swallow
|
2년 전 | 1375 | |
| 5234 | 기타 | 2년 전 | 750 | ||
| 5233 | jQuery |
swallow
|
2년 전 | 2031 | |
| 5232 | 2년 전 | 612 | |||
| 5231 | 2년 전 | 1165 | |||
| 5230 | 2년 전 | 1067 | |||
| 5229 | PHP |
swallow
|
2년 전 | 1018 | |
| 5228 | MySQL | 2년 전 | 719 | ||
| 5227 | PHP |
swallow
|
2년 전 | 833 | |
| 5226 | PHP |
swallow
|
2년 전 | 1807 | |
| 5225 | PHP | 2년 전 | 574 | ||
| 5224 | node.js |
swallow
|
2년 전 | 4077 | |
| 5223 | PHP |
swallow
|
2년 전 | 1314 | |
| 5222 | 기타 |
techstar
|
2년 전 | 556 | |
| 5221 | PHP | 2년 전 | 647 | ||
| 5220 |
swallow
|
2년 전 | 901 | ||
| 5219 | 2년 전 | 874 | |||
| 5218 | 2년 전 | 520 | |||
| 5217 | 2년 전 | 994 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기