Docker安装Mysql5.7

参考博客

docker run --name mysql5.7 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:5.7

docker exec -it mysql5.7 bash

mysql -u root -p

create user 'jak'@'%' IDENTIFIED BY 'root'

create database risk character set 'utf8mb4';

grant all privileges on risk.* to 'jak'@'%';

flush privileges;

show databases;

use risk;

show tables;

你可能感兴趣的:(docker,容器,运维)