tech 409

21/07/14 CentOS 7 MariaDB 외부 접속 가능하게 설정 하는 방법

- mariadb 접속 $ mysql -u root -p - mysql database 선택 > use mysql; > select host, user from user; - localhost 목록만 있는 상태에서 *.* 모든 database, % : 모든 IP 허용 > grant all privileges on *.* to 'root'@'%' identified by 'root 비밀번호'; > flush privileges; > select host, user from user; - mariadb 재시작 $ systemctl restart mariadb - (option) 방화벽 3306 port 차단되어 있을경우 방화벽 설정 $ firewall-cmd --zone=public --permanent -..

tech/linux 2021.07.14

21/07/14 Centos 7 MariaDB 설치 및 실행 명령

1. MariaDB 설치 $ yum install -y mariadb-server 2. 실행 방법 - 시스템 부팅시 자동 시작 $ systemctl start mariadb - mariadb 실행 $ systemctl start mariadb - mariadb 상태 확인 $ systemctl status mariadb 3. Mariadb 접속 방법 - root 계정 비밀번호 생성 $ mysqladmin password mypassword(영문+숫자 특수문자 안됨) $ mysql -u root mypassword > UPDATE user SET password=password('mypassword') WHERE user='root' > FLUSH PRIVILEGES; - mariadb 접속 (root 계정..

tech/linux 2021.07.14