IT/db

centos mariadb 설치

generator 2015. 5. 13. 09:38


--기존 버전 삭제

#yum remove maria*


--설정파일 등록

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


[mariadb]

name = MariaDB

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

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

gpgcheck=1


--설치

#yum install MariaDB-server MariaDB-client


--기동

#service mysql start



--포트 확인(3306)

#netstat -an | grep "LISTEN " 


--root 패드워드 설정

#/usr/bin/mysql -u root mysql

update user set password=password('opennaru') where user='root';

 flush privileges;


--root 외부에서 접속 가능하게

 grant all privileges on *.* to 'root'@'%' identified by 'password' with grant option;



--방화벽 오픈


centos7 이전

#iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT


centos7

#firewall-cmd --permanent --zone=public --add-service=mysql

#firewall-cmd --reload

#systemctl start mysql