Bite Bits/Raspberry Pi

raspbian jessi 에서 mariadb 설치하기

상영 2017. 12. 5. 17:46

$ aptitude -h

... 

update       - Download lists of new/upgradable packages

search       - Search for a package by name and/or expression.

show         - Display detailed information about a package.

...


패키지 목록을 업데이트 하고..

$ sudo aptitude update


mariadb 를 검색한다.

$ aptitude search mariadb

...

p   mariadb-server                             - MariaDB database server (metapackage depending on th

...


mariadb-server 자체가 패키지가 아니고 다른 최신 패키지의 메타 패키지. (자세한 설명은 Description 부분 참고)

$ aptitude show mariadb-server

...

Depends: mariadb-server-10.0 (>= 10.0.32-0+deb8u1)

Description: MariaDB database server (metapackage depending on the latest version)

 This is an empty package that depends on the current "best" version of mariadb-server (currently

 mariadb-server-10.0), as determined by the MariaDB maintainers. Install this package if in doubt

 about which MariaDB version you need. That will install the version recommended by the package

 maintainers. 

...


mariadb 가 mysql 를 기반으로 하는 만큼.. mysql 관련 패키지들도 같이 설치되는 것이 있다.

Y 를 눌러 설치 시작.

$ sudo aptitude install mariadb-server

pi@raspberrypi:~ $ sudo aptitude install mariadb-server

The following NEW packages will be installed:

  libdbd-mysql-perl{a} libdbi-perl{a} libhtml-template-perl{a} libmysqlclient18{a} 

  libreadline5{a} libterm-readkey-perl{a} mariadb-client-10.0{a} mariadb-client-core-10.0{a} 

  mariadb-common{a} mariadb-server mariadb-server-10.0{a} mariadb-server-core-10.0{a} 

  mysql-common{a} 

0 packages upgraded, 13 newly installed, 0 to remove and 44 not upgraded.

Need to get 11.1 MB of archives. After unpacking 123 MB will be used.

Do you want to continue? [Y/n/?] 


중간에 root 사용자의 패스워드 입력을 하라는 부분이 나온다. 그냥 넘어갈 수도 있고, 설정해도 된다.


설치 후, 프로세스 확인을 해보면,..  mysqld 가 떠 있다..

$ ps ax

....

 7538 ?        S      0:00 /bin/bash /usr/bin/mysqld_safe

 7676 ?        Sl     0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr

 7677 ?        S      0:00 logger -t mysqld -p daemon.error

....


로그인 해서 확인. 

$ mysql -u root -p

Enter password: 

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 42

Server version: 10.0.32-MariaDB-0+deb8u1 (Raspbian)


Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> show databases ;

+--------------------+

| Database           |

+--------------------+

| information_schema |

| mysql              |

| performance_schema |

+--------------------+

3 rows in set (0.01 sec)