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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4886 | PHP | 7년 전 | 2386 | ||
| 4885 | PHP | 7년 전 | 2704 | ||
| 4884 | 기타 | 7년 전 | 3081 | ||
| 4883 | PHP | 7년 전 | 2363 | ||
| 4882 | PHP | 7년 전 | 3703 | ||
| 4881 | PHP | 7년 전 | 3341 | ||
| 4880 | JavaScript | 7년 전 | 3341 | ||
| 4879 | JavaScript | 7년 전 | 3062 | ||
| 4878 | PHP | 7년 전 | 5451 | ||
| 4877 | PHP |
welcome
|
7년 전 | 2913 | |
| 4876 | OS | 7년 전 | 2935 | ||
| 4875 | 기타 | 7년 전 | 2387 | ||
| 4874 | PHP |
|
7년 전 | 2752 | |
| 4873 | 웹서버 |
black
|
7년 전 | 2357 | |
| 4872 | PHP |
|
7년 전 | 3575 | |
| 4871 | 기타 | 7년 전 | 3350 | ||
| 4870 | 기타 | 7년 전 | 5654 | ||
| 4869 | 기타 | 7년 전 | 4219 | ||
| 4868 | JavaScript | 7년 전 | 4580 | ||
| 4867 | PHP |
|
7년 전 | 3920 | |
| 4866 | JavaScript | 7년 전 | 4443 | ||
| 4865 | PHP | 7년 전 | 5626 | ||
| 4864 | jQuery | 7년 전 | 2589 | ||
| 4863 | jQuery |
루돌프사슴코
|
7년 전 | 3990 | |
| 4862 | JavaScript | 7년 전 | 7803 | ||
| 4861 | 기타 | 7년 전 | 2258 | ||
| 4860 | 웹서버 | 7년 전 | 2499 | ||
| 4859 | 기타 | 7년 전 | 6951 | ||
| 4858 | 기타 | 7년 전 | 5118 | ||
| 4857 | 웹서버 | 7년 전 | 6193 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기