"CentOS6 MariaDB 설치"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-<source lang='cli'> +<source lang='console'>))
3번째 줄: 3번째 줄:


==확인==
==확인==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# rpm -qa | grep MariaDB
[root@zetawiki ~]# rpm -qa | grep MariaDB
</source>
</source>
12번째 줄: 12번째 줄:


==설치==
==설치==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# yum install MariaDB-server MariaDB-client
[root@zetawiki ~]# yum install MariaDB-server MariaDB-client
... (생략)
... (생략)
32번째 줄: 32번째 줄:
Is this ok [y/N]: y
Is this ok [y/N]: y
</source>
</source>
<source lang='cli'>
<source lang='console'>
... (생략)
... (생략)
chown: cannot access `/var/lib/mysql': No such file or directory
chown: cannot access `/var/lib/mysql': No such file or directory
75번째 줄: 75번째 줄:


==확인 2==
==확인 2==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# rpm -qa | grep MariaDB
[root@zetawiki ~]# rpm -qa | grep MariaDB
MariaDB-server-5.5.34-1
MariaDB-server-5.5.34-1
84번째 줄: 84번째 줄:
==DB 시작 / 패스워드 변경==
==DB 시작 / 패스워드 변경==
아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.
아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# service mysql start
[root@zetawiki ~]# service mysql start
Starting MySQL..                                          [  OK  ]
Starting MySQL..                                          [  OK  ]
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
</source>
</source>
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# netstat -anp | grep 3306
[root@zetawiki ~]# netstat -anp | grep 3306
tcp        0      0 :::3306                    :::*                        LISTEN      18379/mysqld   
tcp        0      0 :::3306                    :::*                        LISTEN      18379/mysqld   
98번째 줄: 98번째 줄:


==접속 확인==
==접속 확인==
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# mysql -uroot -p
[root@zetawiki ~]# mysql -uroot -p
Enter password:  
Enter password:  
</source>
</source>
<source lang='cli'>
<source lang='console'>
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Your MariaDB connection id is 3
118번째 줄: 118번째 줄:
==부팅시 자동시작 설정==
==부팅시 자동시작 설정==
기본으로 설정되어 있지만 한번 더 확인
기본으로 설정되어 있지만 한번 더 확인
<source lang='cli'>
<source lang='console'>
[root@zetawiki ~]# chkconfig mysql on
[root@zetawiki ~]# chkconfig mysql on
[root@zetawiki ~]# chkconfig --list mysql
[root@zetawiki ~]# chkconfig --list mysql

2016년 3월 29일 (화) 10:09 판

리눅스 MariaDB 설치
CentOS MariaDB 설치

1 확인

[root@zetawiki ~]# rpm -qa | grep MariaDB
→ 설치 안됨

2 repo 설정

3 설치

[root@zetawiki ~]# yum install MariaDB-server MariaDB-client
... (생략)
===================================================================================================================================
 Package                             Arch                      Version                          Repository                    Size
===================================================================================================================================
Installing:
 MariaDB-client                      i386                      5.5.34-1                         mariadb                       12 M
 MariaDB-server                      i386                      5.5.34-1                         mariadb                       42 M
Installing for dependencies:
 MariaDB-common                      i386                      5.5.34-1                         mariadb                       29 k

Transaction Summary
===================================================================================================================================
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 55 M
Is this ok [y/N]: y
... (생략)
chown: cannot access `/var/lib/mysql': No such file or directory

PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h jmnote password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://kb.askmonty.org or the
MySQL manual for more instructions.

Please report any problems with the '/usr/bin/mysqlbug' script!

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
Monty Program Ab. You can contact us about this at sales@montyprogram.com.
Alternatively consider joining our community based development effort:
http://kb.askmonty.org/en/contributing-to-the-mariadb-project/


Installed:
  MariaDB-client.i386 0:5.5.34-1                                   MariaDB-server.i386 0:5.5.34-1                                  

Dependency Installed:
  MariaDB-common.i386 0:5.5.34-1                                                                                                   

Complete!
→ DB를 실행하고 패스워드를 설정하라는 안내가 나온다.
→ 그런데 mysql 이라는 이름이 자꾸 보인다. (문제는 없다.)

4 확인 2

[root@zetawiki ~]# rpm -qa | grep MariaDB
MariaDB-server-5.5.34-1
MariaDB-common-5.5.34-1
MariaDB-client-5.5.34-1

5 DB 시작 / 패스워드 변경

아까 나왔던 안내대로 DB를 시작하고 패스워드를 바꾼다.

[root@zetawiki ~]# service mysql start
Starting MySQL..                                           [  OK  ]
[root@zetawiki ~]# /usr/bin/mysqladmin -u root password 'P@ssw0rd'
[root@zetawiki ~]# netstat -anp | grep 3306
tcp        0      0 :::3306                     :::*                        LISTEN      18379/mysqld
서비스 등록도 mysql이란 이름으로 되어 있고, 포트도 3306, 데몬이름도 mysqld이다.

6 접속 확인

[root@zetawiki ~]# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.34-MariaDB MariaDB Server

Copyright (c) 2000, 2013, Oracle, Monty Program Ab and others.

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

MariaDB [(none)]> quit
Bye
[root@zetawiki ~]#

7 부팅시 자동시작 설정

기본으로 설정되어 있지만 한번 더 확인

[root@zetawiki ~]# chkconfig mysql on
[root@zetawiki ~]# chkconfig --list mysql
mysql          	0:off	1:off	2:on	3:on	4:on	5:on	6:off

8 같이 보기

9 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}