본문 바로가기

Linux/Mysql7

MariaDB 설치 ##### MariaDB Download (원하는 Version Download) wget http://downloads.mariadb.org/interstitial/mariadb-10.3.28/bintar-linux-x86/mariadb-10.3.28-linux-x86_64.tar.gz ##### mysql 그룹 및 user 생성 groupadd -g 501 mysql useradd -u 501 -g 501 -d /usr/local/mysql -s /sbin/nologin mysql ##### MariaDB 설치 tar zxvf mariadb-10.3.28-linux-x86_64.tar.gz ln -s mariadb-10.3.28 mysql cd mysql mkdir innodb mysql-bin tm.. 2023. 12. 27.
mysql dump 및 restore 1. dump 뜨기 - mysqldump -u사용자id -p 데이터베이스명 > 저장될 파일 명 - mysqldump -uroot -p test > test.sql * 모든 DB dump 뜨기 - mysqldump -uroot -p --all-databases > all_dump.sql * 여러 DB dump 뜨기 - mysqldump -uroot -p test test1 test2 > all_test.sql * 테이블만 dump 뜨기 - mysqldump -uroot -p test abc > test_abc_table.sql ### test DB에 abc 테이블을 덤프 * charaset 지정 dump 뜨기 - mysqldump -uroot -p --default-character-set=utf8 디비명.. 2020. 6. 1.
mysql user 생성 및 권한 설정 1. 유저 생성 create user 'userid'@'%' identified by '비밀번호'; - %의 경우, 접속할 host 주소 이며, %는 모든 host 접속을 가능하게 한다. flush privileges; 2. 권한 설정 - 모든 권한 설정 grant all privileges on *.* username@host identified by 'password'; flush privileges; - select 권한 설정 grant select on 'test'.* to 'user'@'host' identied by 'password'; - kof DB에 select, insert, update, delete 권한을 192.168.1.0/24 으로 접근하는 bluemary에게 권한 주기 gra.. 2020. 6. 1.
리눅스 mysql 설치 *** 패키지 설치yum install libaio perl 1. mysql downloadcd /usr/local/ wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.25-linux-glibc2.5-x86_64.tar.gz 2. mysql group 및 user 생성groupadd -g 501 mysqluseradd -u 501 -g 501 -d /usr/local/mysql -s /sbin/nologin mysql 3. 압축해제tar zxvf mysql-5.6.25-linux-glibc2.5-x86_64.tar.gzln -s mysql-5.6.25-linux-glibc2.5-x86_64 mysql 4. 설치cd mysqlchown -R mysq.. 2016. 10. 31.