OS모아
OS모아[가입] 로그인 / 회원가입   검색     


  
리눅스
 

APM설치(3) - 우분투 서버에 mariaDB 설치하기
2018-06-17 23:56:14 댓글:(0)   조회:955
 

 
APM설치(3) - 우분투 서버에 mariaDB 설치하기 


[MariaDB 설치]
 #apt-get install mariadb-server
  우분투 16.04 버젼에는 MariaDB 10.0.24 이 기본 설치됩니다.

 데이터베이스 설정및 초기화 작업입니다.
 # /usr/bin/mysql_secure_installation  
 
  위 화면 처럼 mysql root 비밀번호만 설정을 하고 나머지는 모두 엔터로 끝냅니다.
  여기서는 비밀번호로 1234로 합니다.


[사용자 접속권한 설정]


root@test-host:~#  mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 50
Server version: 10.0.34-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others

Type help; or h for help. Type c to clear the current input   nt.

MariaDB [(none)]> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]>  select host, user, password from user;
+-----------+------+-------------------------------------------+
| host      | user | password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *A4B6157319038724E3560894F7F932C8886EBFCF |
+-----------+------+-------------------------------------------+
1 row in set (0.00 sec)

MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO root@%;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]>  GRANT ALL PRIVILEGES ON *.* TO root@::1;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO root@127.0.0.1;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]> update mysql.user set password = password(1234)    er = root;
Query OK, 3 rows affected (0.01 sec)
Rows matched: 4  Changed: 3  Warnings: 0

MariaDB [mysql]>  flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [mysql]>  select host, user, password from user;
+-----------+------+-------------------------------------------+
| host       | user | password                                                    |
+-----------+------+-------------------------------------------+
| localhost  | root | *A4B6157319038724E3560894F7F932C8886EBFCF      |
| %          | root | *A4B6157319038724E3560894F7F932C8886EBFCF      |
| ::1         | root | *A4B6157319038724E3560894F7F932C8886EBFCF      |
| 127.0.0.1 | root  | *A4B6157319038724E3560894F7F932C8886EBFCF     |
+-----------+------+-------------------------------------------+
4 rows in set (0.00 sec)


[DB 연동모듈 설치]
 php와 mysql의 DB 연동모듈 설치해야 합니다.
 # apt-get install php-mysql 

[MYSQL 콘솔 클라이언트 버전체크]
 ~# mysql -V
     mysql  Ver 15.1 Distrib 10.0.34-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2


[mysql 설정]
 vi /etc/mysql/mariadb.conf.d/50-server.cnf
 
  [mysqld]로 된 항목 하단에아래 내용을 기재합니다.
     
    character-set-server = utf8mb4
    collation-server = utf8mb4_unicode_ci
   
      
[mysql 재시작] 
  root@old-host:~# service mysql restart
    
 
 

. 


[이전글]  APM설치(4) - 우분투 서버에사용자DB와 테스트 table 생성하기
[다음글]  APM설치(2) - 우분투 서버에 PHP 설치하기


 
댓글쓰기는 회원(로그인 하신분) 이상 가능합니다.


 댓글 (0)

  
리눅스
페이지: 1 / 12   

 우분투 다운로드 사이트
열람:2419   2022.12.11


 리눅스 - 일반 사용자에 root 권한 부여하는 방법
열람:19907   2021.07.21


 울트라에디터 - 리눅스 원격 접속으로 문서편집 하기 (vi 대용)
열람:4367   2021.07.21


 시간설정 - 우분투 시간확인, 시간설정, 시간 동기화 방법
열람:2619   2021.03.15


 putty - 리눅스 원격 터미널 글자크기, 글꼴 바꾸기
열람:3130   2021.03.15


 우분투 18.04 인터넷 연결 애러(ubuntu network error)
열람:2422   2020.12.28


 윈도우용 ntfs 하드디스크를 리눅스용 ext4로 포멧하기
열람:3205   2020.06.25


 HeidiSQL - 윈도우즈용 mariaDb 관리용 클라이언트
열람:2144   2020.01.15


 VMware Player 에 CentOS 8 환경설정
열람:2836   2019.10.17


 centOS 8 설치 USB 메모리 만들기
열람:3310   2019.10.16



[1]  [2]  [3]  [4]  [5]  

복수단어 검색은 공백(space)로 구분해 주세요.




 
최근 글 [손님]
 
인기 글 [손님]
[예진아씨] 자료없음