MariaDB

mariadb 이관 방법 및 계정 생성

더킹123 2021. 6. 24. 11:26
728x90

mariadb 이관 방법 및 계정 생성

# export
mysqldump -u[계정]  -p[패스워드] [데이터베이스이름] > test.sql

예시) mysqldump -utestuser  -ptestpasswd testdb > test.sql

# import
mysql -u[계정] -p[패스워드] [데이터베이스이름] < test.sql

예시) mysql -utestuser -ptestpasswd testdb < test.sql 

 

# 계정생성
create database testdb default character set utf8; 

create user 'testuser'@'%' identified by 'testpasswd';

 

grant all privileges on *.* to testuser@localhost identified by 'testpasswd' with grant option;
grant all privileges on testdb.* to testuser@'%'; 

 

flush privileges;

728x90