00. Server time zone changed.

$ date

$ sudo rm /etc/localtime

$ sudo ln -s /usr/share/zoneinfo/Asia/Seoul /etc/localtime

$ date

// 2020. 03. 17. (화) 23:45:00 KST

 

01. Update packages index.

$ sudo apt update

 

02. Once the packages list is updated, install MariaDB

$ sudo apt install mariadb-server

 

// Version Check

$ mysql -V

 

// Root account changed

$ sudo su root

 

03. Port changed / Charset changed

$ vim /etc/mysql/my.cnf

[mysqld]

character-set-server = utf8mb4

collation-server = utf8mb4_unicode_ci

character_set_server = utf8mb4

collation_server = utf8mb4_unicode_ci

$ sudo service mysql restart

 

04. Root password changed

$ mysqladmin -u root -p password 'qwer'

Enter password: 그냥 엔터

 

05. 운영용 database / id 생성

// root로 mariadb 접속
MariaDB [(none)]> create database blog;
MariaDB [(none)]> CREATE USER 'denodo'@'localhost' IDENTIFIED BY 'qwer';
MariaDB [(none)]> CREATE USER 'denodo'@'%' IDENTIFIED BY 'qwer';

 

// GRANT type_of_permission ON database_name.table_name TO ‘username’@'localhost’;

MariaDB [(none)]> GRANT ALL PRIVILEGES ON blog.* TO 'denodo1'@'localhost';

MariaDB [(none)]> GRANT ALL PRIVILEGES ON blog.* TO 'denodo1'@'%';

MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;
 
$ mysql -u denodo -p
Enter password:설정한 비밀번호 입력

'Server > AWS' 카테고리의 다른 글

[Node.js] AWS Git 사용법  (0) 2020.07.31
[Node.js] AWS install nodejs  (0) 2020.07.31
[AWS] 웹서비스 세션 처리  (0) 2019.09.11
[강연] AWS 설치 및 간단 사용법 + Wordpress  (0) 2015.10.24
[Amazon Web Service] EC2 참고  (0) 2014.09.16

+ Recent posts