docker mysql

docker run -p 3306:3306 --name mymysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7

$PWD 换成存储的路径

 

 

 

create user materiel_dev identified by '123456';
create database  materiel_dev character set utf8mb4 collate utf8mb4_unicode_ci;
grant all on materiel_dev.* to matreiel_dev;

  

posted @ 2018-07-25 10:59  zqiushi  阅读(88)  评论(0编辑  收藏  举报