Remark : mariadb 를 설치 하고 연결해 보자
1.설치
1 2 3 |
$ sudo apt install mariadb-server-10.0 |
2.mysql 로컬 로그인
1 2 3 4 5 6 7 8 9 10 11 |
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 42 Server version: 10.0.28-MariaDB-2+b1 Raspbian testing-staging Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> |
3.데이블(life) 만들기
1 2 3 |
CREATE DATABASE life DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
4.데이블(life) 접근 계정 생성
1 2 3 |
GRANT ALL ON life.* TO 'life'@'localhost' IDENTIFIED BY 'mypasswd1123'; |
5.변경된 내용 반영
1 2 3 |
FLUSH PRIVILEGES; |
6.user table 확인 해보기
1 2 3 4 5 6 7 8 9 10 11 12 |
MariaDB [mysql]> use mysql MariaDB [mysql]> select user,host from user; +----------------+-----------+ | user | host | +----------------+-----------+ | life@localhost | % | | life | localhost | | root | localhost | |
3.계속….