dockerで作成したmysqlのDBを操作するには以下のコマンドを叩くだけ、phpmyadminなどは必要ない
$sudo docker ps
2f5f368961f9 mysql:5.7 "docker-entrypoint.s…" 7 days ago Up 7 days 3306/tcp, 33060/tcp wordpress_db_1
$sudo docker exec -it wordpress_db_1 mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23068
Server version: 5.7.35 MySQL Community Server (GPL)
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql>