마리아DB 셋팅하기
페이지 정보
본문
yum -y install http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
[출처] CentOS 7 에서 mariaDB 깔기|작성자 바보상자
yum.mariadb.org/10.1.4/centos6-x86
http://yum.mariadb.org/10.0.17/centos6-amd64/
http://egloos.zum.com/mcchae/v/11155920
vi /etc/yum.repos.d/mariadb.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0.17/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install MariaDB-server MariaDB-client
DB시작
/etc/init.d/mysql start
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'majorplan1234' WITH GRANT OPTION;
유저추가
mysql> GRANT ALL PRIVILEGES ON majorplan.* TO 'dbuser'@'localhost' IDENTIFIED BY 'major1234' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON majorplan.* TO 'dbuser'@'%' IDENTIFIED BY 'major1234' WITH GRANT OPTION;
서비스리스타트
service mysql restart
재부팅시 자동 실행
chkconfig mysql on
자동실행 확인
chkconfig --list mysql
방화벽 해제
iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart
yum install httpd
yum install php
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
service iptables restart
vi /etc/httpd/conf/httpd.conf 추가
AddType application/x-httpd-php .php .php3 .html .htm
문법확인
httpd -t
마리아db 랑 php 연결
yum install php-mysql
service mysql restart
service httpd restart
MariaDB 업데이트 후 아래와 같은 에러 발생 시
ERROR – 2014-12-15 16:55:10 –> Severity: Warning –> mysqli_connect(): Headers and client library minor version mismatch. Headers:50540 Library:100015 /public_html/database/drivers/mysqli/mysqli_driver.php 76
php -i | grep 'Client API' 확인
Client API version => 5.3.12-MariaDB
Client API library version => 5.3.12-MariaDB
Client API header version => 5.1.73
Client API version => 5.3.12-MariaDB
- php-mysqlnd 설치
# yum erase php-mysql
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# yum install php-mysqlnd
안되면
# yum --enablerepo=remi,remi-test install php-mysqlnd
# service mysql restart
service httpd restart
db 언어설정
alter database mydb character set = utf8;
ALTER TABLE test CHARACTER SET utf8
ALTER TABLE test DEFAULT CHARACTER SET utf8
[출처] CentOS 7 에서 mariaDB 깔기|작성자 바보상자
yum.mariadb.org/10.1.4/centos6-x86
http://yum.mariadb.org/10.0.17/centos6-amd64/
http://egloos.zum.com/mcchae/v/11155920
vi /etc/yum.repos.d/mariadb.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0.17/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install MariaDB-server MariaDB-client
DB시작
/etc/init.d/mysql start
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'majorplan1234' WITH GRANT OPTION;
유저추가
mysql> GRANT ALL PRIVILEGES ON majorplan.* TO 'dbuser'@'localhost' IDENTIFIED BY 'major1234' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON majorplan.* TO 'dbuser'@'%' IDENTIFIED BY 'major1234' WITH GRANT OPTION;
서비스리스타트
service mysql restart
재부팅시 자동 실행
chkconfig mysql on
자동실행 확인
chkconfig --list mysql
방화벽 해제
iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart
yum install httpd
yum install php
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
service iptables save
service iptables restart
vi /etc/httpd/conf/httpd.conf 추가
AddType application/x-httpd-php .php .php3 .html .htm
문법확인
httpd -t
마리아db 랑 php 연결
yum install php-mysql
service mysql restart
service httpd restart
MariaDB 업데이트 후 아래와 같은 에러 발생 시
ERROR – 2014-12-15 16:55:10 –> Severity: Warning –> mysqli_connect(): Headers and client library minor version mismatch. Headers:50540 Library:100015 /public_html/database/drivers/mysqli/mysqli_driver.php 76
php -i | grep 'Client API' 확인
Client API version => 5.3.12-MariaDB
Client API library version => 5.3.12-MariaDB
Client API header version => 5.1.73
Client API version => 5.3.12-MariaDB
- php-mysqlnd 설치
# yum erase php-mysql
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# yum install php-mysqlnd
안되면
# yum --enablerepo=remi,remi-test install php-mysqlnd
# service mysql restart
service httpd restart
db 언어설정
alter database mydb character set = utf8;
ALTER TABLE test CHARACTER SET utf8
ALTER TABLE test DEFAULT CHARACTER SET utf8
- 이전글mongoDB 설치(몽고디비) 20.02.21
- 다음글APM CentOS 6.5 Apache 2.2 PHP 5.3 MariaDB 5.5 설치해보자! 20.02.21
댓글목록
등록된 댓글이 없습니다.