- Building Web Apps with Spring 5 and Angular
- Ajitesh Shukla
- 112字
- 2021-07-02 19:38:27
Setting up MySQL as a container service
In this section, you will learn how to set up MySQL as a container service. In the Docker terminal, execute the following command:
docker run -ti -d -p 3326:3306 --name mysqldev -e MYSQL_ROOT_PASSWORD=r00t -v "$PWD":/mnt/ mysql:5.7
The preceding command sets up MySQL 5.7 version within the container, and starts the mysqld service. Open MySQL Workbench, and create a new connection by entering the details such as those shown in the following screenshot; click on Test Connection. You should be able to establish the connection successfully:

Figure 1.21: MySQL server running in the container and accessible from host machine at 3326 port using MySQL Workbench
推薦閱讀
- INSTANT Mock Testing with PowerMock
- Learning RxJava
- 實用防銹油配方與制備200例
- Cassandra Design Patterns(Second Edition)
- HTML5 and CSS3 Transition,Transformation,and Animation
- 實戰Java高并發程序設計(第3版)
- 精通Python設計模式(第2版)
- 領域驅動設計:軟件核心復雜性應對之道(修訂版)
- Android Wear Projects
- Mastering Linux Security and Hardening
- 代替VBA!用Python輕松實現Excel編程
- 零代碼實戰:企業級應用搭建與案例詳解
- Learning Ionic
- Get Your Hands Dirty on Clean Architecture
- 算法超簡單:趣味游戲帶你輕松入門與實踐