- 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
推薦閱讀
- Fundamentals of Linux
- FreeSWITCH 1.8
- 動手玩轉Scratch3.0編程:人工智能科創教育指南
- 軟件測試項目實戰之性能測試篇
- 面向STEM的Scratch創新課程
- Oracle數據庫從入門到運維實戰
- UML+OOPC嵌入式C語言開發精講
- 人人都是網站分析師:從分析師的視角理解網站和解讀數據
- Java程序設計:原理與范例
- HTML 5與CSS 3權威指南(第3版·上冊)
- Web前端應用開發技術
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- OpenMP核心技術指南
- Sails.js Essentials
- Yii2 By Example