IT Japan

CentOS 6.5에 MariaDB 10.0.12를 인스톨(yum을 사용) 본문

카테고리 없음

CentOS 6.5에 MariaDB 10.0.12를 인스톨(yum을 사용)

swhwang 2015. 1. 20. 15:31
반응형

MariaDB의 인스톨

1.MariaDB의 PGP key를 인스톨

# rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB



2.Repository의 설정

http://yum.mariadb.org/로부터 자신이 환경에 맞는 URL선택


# vim /etc/yum.repos.d/mariadb.repo

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/10.0.12/centos6-x86

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

enabled=1




3.MariaDB를 yum

이것으로 문제가 없으면 인스톨은 완료.  「Transaction Check Error:」가 나오면, mysql-libs를 삭제하면 좋다.


yum -y install MariaDB-client MariaDB-server



4.MariaDB를 사용한다.


Start한다.

MariaDB로 해도, MySQL과 같이 mysql이란 명령어를 사용한다.


# /etc/init.d/mysql start

Starting MySQL. SUCCESS!




5.패스워드 설정

# /usr/bin/mysqladmin -u root password 'passwd'



6.콘솔을 기동한다.

# mysql -u root -p


Enter password:

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

Your MariaDB connection id is 6

Server version: 10.0.12-MariaDB MariaDB Server


Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.


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


MariaDB [(none)]>




7.MariaDB의 설정

# Status의 확인

서버의 문자코드가 latin1으로 되어있다.





MariaDB [(none)]> status

--------------

mysql  Ver 15.1 Distrib 10.0.12-MariaDB, for Linux (i686) using readline 5.1


Connection id:          6

Current database:

Current user:           root@localhost

SSL:                    Not in use

Current pager:          stdout

Using outfile:          ''

Using delimiter:        ;

Server:                 MariaDB

Server version:         10.0.12-MariaDB MariaDB Server

Protocol version:       10

Connection:             Localhost via UNIX socket

Server characterset:    latin1

Db     characterset:    latin1

Client characterset:    utf8

Conn.  characterset:    utf8

UNIX socket:            /var/lib/mysql/mysql.sock

Uptime:                 14 min 1 sec


Threads: 1  Questions: 12  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 0.014

--------------



8.설정파일을 편집한다.

이번은 utf8로 했으므로, 이하처럼, 설정파일에 추기, 또  HandlerSocket이란 것을 유효로 하면 데이터베이스에의 액세스를 고속화하는것이 가능하다.


# vim /etc/my.conf.d/server.cnf

# this is only for the mysqld standalone daemon

[mysqld]

character-set-server = utf8

plugin-load = handlersocket.so


9.설정을 반영시키는 것으로 MariaDB를 재기동

재기동하지않으면 설정이 반영안된다.


# /etc/init.d/mysql restart

Shutting down MySQL.. SUCCESS!

Starting MySQL. SUCCESS!





10.설정의 확인(문자 코드)

MariaDB [(none)]> status;

--------------

mysql  Ver 15.1 Distrib 10.0.12-MariaDB, for Linux (i686) using readline 5.1


Connection id:          3

Current database:

Current user:           root@localhost

SSL:                    Not in use

Current pager:          stdout

Using outfile:          ''

Using delimiter:        ;

Server:                 MariaDB

Server version:         10.0.12-MariaDB MariaDB Server

Protocol version:       10

Connection:             Localhost via UNIX socket

Server characterset:    utf8

Db     characterset:    utf8

Client characterset:    utf8

Conn.  characterset:    utf8

UNIX socket:            /var/lib/mysql/mysql.sock

Uptime:                 19 sec


Threads: 1  Questions: 4  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 0.210

--------------


11.설정의 확인(HandlerSocket)

제일 뒤에 handlersocket이라고 표시되면 좋다.


MariaDB [(none)]> show plugins;

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

| Name                        | Status   | Type               | Library          | License |

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

| binlog                      | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| mysql_native_password       | ACTIVE   | AUTHENTICATION     | NULL             | GPL     |

| mysql_old_password          | ACTIVE   | AUTHENTICATION     | NULL             | GPL     |

| MEMORY                      | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| MRG_MyISAM                  | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| MyISAM                      | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| CSV                         | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| ARCHIVE                     | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| FEDERATED                   | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| InnoDB                      | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| XTRADB_READ_VIEW            | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| XTRADB_INTERNAL_HASH_TABLES | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| XTRADB_RSEG                 | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_TRX                  | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_LOCKS                | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_LOCK_WAITS           | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMP                  | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMP_RESET            | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMPMEM               | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMPMEM_RESET         | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMP_PER_INDEX        | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CMP_PER_INDEX_RESET  | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_BUFFER_PAGE          | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_BUFFER_PAGE_LRU      | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_BUFFER_POOL_STATS    | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_METRICS              | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_DEFAULT_STOPWORD  | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_DELETED           | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_BEING_DELETED     | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_CONFIG            | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_INDEX_CACHE       | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_FT_INDEX_TABLE       | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_TABLES           | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_TABLESTATS       | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_INDEXES          | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_COLUMNS          | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_FIELDS           | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_FOREIGN          | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_FOREIGN_COLS     | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_TABLESPACES      | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_SYS_DATAFILES        | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| INNODB_CHANGED_PAGES        | ACTIVE   | INFORMATION SCHEMA | NULL             | GPL     |

| PERFORMANCE_SCHEMA          | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| Aria                        | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| BLACKHOLE                   | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| FEEDBACK                    | DISABLED | INFORMATION SCHEMA | NULL             | GPL     |

| partition                   | ACTIVE   | STORAGE ENGINE     | NULL             | GPL     |

| handlersocket               | ACTIVE   | DAEMON             | handlersocket.so | BSD     |

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

48 rows in set (0.00 sec)















반응형
Comments