1. Mysql installation

www.runoob.com/docker/dock…

  1. Into the container

Docker exec it (iD) /bin/bash

  1. Enter the mysql

mysql -uroot -p123456

  1. Establish users and authorize them

CREATE USER ‘root’@’%’ IDENTIFIED BY ‘root’; GRANT ALL PRIVILEGES ON . TO ‘root’@’%’; GRANT ALL PRIVILEGES ON. TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;

GRANT ALL PRIVILEGES ON. TO ‘root’@’127.0.0.1’ IDENTIFIED BY ‘root’ WITH GRANT OPTION; GRANT ALL PRIVILEGES ON . TO ‘root’@’localhost’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;

FLUSH PRIVILEGES