APM을 설치 했으면 mysql(MariaDB) 초기 설정 하겠습니다.
root 관리자 계정을 접속
[root@localhost lib]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.51 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
초기 비번은 없기 때문에 그냥 엔터 치고 넘어가면 됩니다.
Database 조회
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)
mysql>
Database 생성
mysql> create database damuk;
Query OK, 1 row affected (0.00 sec)
Database 사용
mysql> use damuk;
Database changed
계정조회
mysql> select host, user, password from user;
+-----------------------+------+----------+
| host | user | password |
+-----------------------+------+----------+
| localhost | root | |
| localhost.localdomain | root | |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
| localhost.localdomain | | |
+-----------------------+------+----------+
6 rows in set (0.00 sec)
계정생성
mysql> create user 'damuk' identified by '@#^$%^#$%^#$%ㅎ$%@ㅆ@@';
Query OK, 0 rows affected (0.00 sec)
계정조회
mysql> select host, user, password from user;
+-----------------------+-------+-------------------------------------------+
| host | user | password |
+-----------------------+-------+-------------------------------------------+
| localhost | root | |
| localhost.localdomain | root | |
| 127.0.0.1 | root | |
| ::1 | root | |
| localhost | | |
| localhost.localdomain | | |
| % | damuk | *4921FF254610FFA4AE3EFF4D7773B0E9B7202F9E |
+-----------------------+-------+-------------------------------------------+
7 rows in set (0.00 sec)
schema, database 권한 부여
mysql> grant all privileges on damuk.* to '%' identified by 'damuk' with grant option;
Query OK, 0 rows affected (0.00 sec)
해당 유저에 해당 데이터베이스 권한을 부여 합니다.
schema, database 권한 확인
mysql> show grants for 'damuk'@'%';
+------------------------------------------------------------------------------------------------------+
| Grants for damuk@% |
+------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'damuk'@'%' IDENTIFIED BY PASSWORD '*4921FF254610FFA4AE3EFF4D7773B0E9B7202F9E' |
| GRANT ALL PRIVILEGES ON `damuk`.* TO 'damuk'@'%' WITH GRANT OPTION |
+------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
보안 이슈 Log4j RCE 0-day에 대한 보호(CVE-2021-44228) 업데이트 방법 (0) | 2021.12.13 |
---|---|
리눅스 CentOS - FTP 서버 구축 설치 (0) | 2021.12.01 |
리눅스(centos) APM(Apache/PHP/MySQL) 설치하기 (0) | 2021.11.30 |
리눅스 OS 버전 확인 명령어 (0) | 2021.11.30 |