在mac运行docker版mysql

2019-11-01  本文已影响0人  WangRupeng
# get mysql docker image

docker pull mysql
# start mysql container
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d mysql

# get into mysql container
docker exec -ti mysql /bin/bash

# login mysql
mysql -u root -p

# allow all users to login into mysql
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
上一篇下一篇

猜你喜欢

热点阅读