docker

docker mariadb 설치

초이짬 2020. 7. 29. 22:44
728x90

docker run --name mariadb -d -p 13306:3306 -v /data/mariadb:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=[root 비번] mariadb

docker exec -it mariadb /bin/bash

mysql -u root -p

grant all privileges on *.* to 'root'@'%' ; 
flush privileges;

create user '[계정ID]'@'%' identified by '[계정비번]';

grant all privileges on *.* to 'letech'@'%' ;

 

 

flush privileges; 

728x90