티스토리 뷰

ubuntu 22.04에서 apt 패키지로 설치한 mariaDB version 10.6.12 기준임.

 

1. 환경 설정 파일 수정

 

vi /etc/mysql/mariadb.conf.d/50-server.cnf

bind-address를 모든 대역에서 접속가능하도록 0.0.0.0으로 변경

 15 #user                    = mysql
 16 pid-file                = /run/mysqld/mysqld.pid
 17 basedir                 = /usr
 18 #datadir                 = /var/lib/mysql
 19 #tmpdir                  = /tmp
 20 
 21 # Broken reverse DNS slows down connections considerably and name resolve is
 22 # safe to skip if there are no "host by domain name" access grants
 23 #skip-name-resolve
 24 
 25 # Instead of skip-networking the default is now to listen only on
 26 # localhost which is more compatible and is not less secure.
 27 bind-address            = 0.0.0.0

서버 재시작

systemctl restart mariadb.service

2. root 권한 수정

mysql 접속후 설정

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04

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

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

MariaDB [(none)]> grant all privileges on *.* to 'root'@'%'identified by '비밀번호';
MariaDB [(none)]> flush privileges;

결과조회

MariaDB [(none)]> select host,user,password from mysql.user;

'infra&system > mariaDB' 카테고리의 다른 글

mariadb | dump 저장  (0) 2024.04.14
mariaDB_DDL  (0) 2022.09.23
mariaDB_인코딩 설정  (0) 2022.09.23
mysql 접속 포트넣기  (0) 2022.09.06
GROUP BY와 WINDOW함수  (0) 2022.04.13
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함