dev/linux

[centos] Install MariaDB

재삐신생 2016. 2. 7. 03:34
반응형

레파지토리 설정 https://downloads.mariadb.org/mariadb/repositories/



vi /etc/yum.repos.d/MariaDB.repo


#CentOS 5 | mariaDB 5.5

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/5.5/centos5-amd64

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

gpgcheck=1


#CentOS 6 | mariaDB 5.5

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/5.5/centos6-amd64

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

gpgcheck=1


#CentOS 7 | mariaDB 5.5

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/5.5/centos7-amd64

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

gpgcheck=1


설치

yum install MariaDB-server MariaDB-client


UTF-8 설정

vi /etc/my.cnf.d/server.cnf


#찾아서 삽입

[mysqld]

character_set_server=utf8

collation_server=utf8_general_ci

init_connect=set collation_connection=utf8_general_ci

init_connect=set names utf8

character-set-server=utf8

character-set-client-handshake = TRUE


서비스 시작

service mysql start


루트 패스워드 설정

mysqladmin -u root password XXXX


UTF-8 확인

mysql -u root -pXXXX

show variables like 'c%';


반응형

'dev > linux' 카테고리의 다른 글

[nginx] add or remove www domain  (0) 2016.02.17
install zend guard loader  (0) 2016.02.07
[centos] cofiguration nginx with php-fpm  (0) 2016.02.07
[centos] php fpm configuration  (0) 2016.02.07
[centos] install php 5.3  (0) 2016.02.07