Docker进入mysql容器
https://blog.csdn.net/weixin_39800144/article/details/80872515
先启动mysql服务,启动mysql后,如果想进入mysql的命令行,执行如下命令
[root@izbp163wlhi02tcaxyuxb7z ~]# docker exec -it mysql1 bash //mysql1是我启动的mysql服务的nameroot@654c15160c66:/# mysql -uroot -pEnter password://输入密码即可Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 9Server version: 8.0.11 MySQL Community Server - GPLOracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>//已经进入命令行模式
————————————————
版权声明:本文为CSDN博主「IT云清」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_39800144/article/details/80872515
