Fist of all, I presume that you have already installed Docker and Portainer and works smoothly. All CLI procdures are based on BT Linux Platform with Mysqld.service ready, you could baidu with Bao Ta Mian Ban and implege it. and systemctl status mysqld will show the detail information whether Mysql actived or inactive.
Docker search and pull the Typecho image which your prefered. Creat a container, port mapping. and then ifconfig to findout the host server ip address with name Docker 0.
I hope you hold the location about Mysql config file with name "my.cnf", if you donnot, could type the CLI to find it.
locate my.cnf
/etc/my.cnf
/etc/my.cnf.d
/etc/my.cnf.d/mysql-clients.cnf
/var/lib/docker/overlay2/29512eeba9cc91ff3d4ea4fc8e5d6ee00e87dcbf225a5f31c3a6c55bdb603877/diff/etc/alternatives/my.cnf
/var/lib/docker/overlay2/29512eeba9cc91ff3d4ea4fc8e5d6ee00e87dcbf225a5f31c3a6c55bdb603877/diff/etc/mysql/my.cnf
/var/lib/docker/overlay2/29512eeba9cc91ff3d4ea4fc8e5d6ee00e87dcbf225a5f31c3a6c55bdb603877/diff/etc/mysql/my.cnf.fallback
/var/lib/docker/overlay2/29512eeba9cc91ff3d4ea4fc8e5d6ee00e87dcbf225a5f31c3a6c55bdb603877/diff/var/lib/dpkg/alternatives/my.cnf
/var/lib/docker/overlay2/36a4bb2bec11ae14f61398e5cf883bf7f23dbce03babb47f1dc3669663d98798/diff/etc/alternatives/my.cnf
/var/lib/docker/overlay2/36a4bb2bec11ae14f61398e5cf883bf7f23dbce03babb47f1dc3669663d98798/diff/etc/mysql/my.cnf
/var/lib/docker/overlay2/36a4bb2bec11ae14f61398e5cf883bf7f23dbce03babb47f1dc3669663d98798/diff/etc/mysql/my.cnf.fallback
/var/lib/docker/overlay2/36a4bb2bec11ae14f61398e5cf883bf7f23dbce03babb47f1dc3669663d98798/diff/var/lib/dpkg/alternatives/my.cnf
/var/lib/docker/volumes/90ced81dcaa7bfb7b18b6d64f00a0e68ab9d81e640345c5969a780f1a88b4ee1/_data/my.cnf
/var/lib/docker/volumes/90ced81dcaa7bfb7b18b6d64f00a0e68ab9d81e640345c5969a780f1a88b4ee1/_data/my.cnf.fallback
/www/server/mysql/mysql-test/include/default_my.cnf
/www/server/mysql/mysql-test/suite/federated/my.cnf
/www/server/mysql/mysql-test/suite/rpl/my.cnf
/www/server/mysql/support-files/bt-my.cnf
Oh, so many "my.cnf" files was shown on screen, which one is we really need? follow the command
ps aux|grep mysql|grep 'my.cnf'
maybe the CLI shown the blank. why? Because we donnot appiont the paticular "my.cnf" as the default.
we will ask mysql to answer our questions
mysql --help|grep 'my.cnf'
order of preference, my.cnf, $MYSQL_TCP_PORT,
/etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
finally, the true file loaded while program startup are shown out as order.
edit the /etc/mysql/my.cnf with nano
Oh,NO~~~~, no word in the file. OK, next file
add the sentence as below:
bind-address = 0.0.0.0
systemctl restart mysqld