-
Mariadb) 초기 세팅Programing Language/리눅스 2021. 4. 13. 22:35728x90반응형This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
1. mysql_secure_installation// shell에서의 명령어 -> mysql 보안설정 2. mysql -u root -p// mariadb 접근 1번에서 설정한 비밀번호로 접근 3. create database 이름;// 데이터베이스 만들기 4. use mysql;// mysql 데이터베이스로 접속 5. create user '아이디'@'%' identified by '비밀번호'; 6. alter database 데이터베이스명 default character set = utf8; //데이터 베이스 character의 기본 값을 utf8로 설정 7. grant all privileges on 데이터베이스.* to 아이디@'%'; //to 다음 데이터베이스에 명시안 아이디에 모든 권한 부여하기 8. flush privileges; //grant 테이블을 reload함으로서 변경 사항을 즉시 반영. 이후 DB 관리 툴로 데이터베이스에 접근할때
"mariadb" 같은 경우는
일단
1. iptables -I INPUT 1 -p tcp --dport 3306 -j ACCEPT //포트열기
2. /etc/mysql/mariadb.conf.d/50-server.cnf //mysql 일경우 /etc/mysql/mysql.conf.d/mysqld.cnf
3. service mysql restart 하면된다.728x90반응형'Programing Language > 리눅스' 카테고리의 다른 글
리눅스) could not get lock /var/lib/dpkg/lock-frontend 에러 해결 (0) 2021.04.20 Ubuntu) 포트, 방화벽 확인 및 포트 열기 (6) 2021.04.19 AWS) EC2에 이용자 추가하여 ssh로 접근시키기 (0) 2021.03.30 Linux) composer 어느 위치에서든 composer만 쳐도 실행되게 하기 (0) 2020.06.09 Linux) lsof - 실행 중인 파일과 프로세스 정보 출력 (0) 2020.05.08