- 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
推薦閱讀
- Puppet 4 Essentials(Second Edition)
- OpenStack Cloud Computing Cookbook(Fourth Edition)
- C語言從入門到精通(第4版)
- SEO實戰密碼
- FFmpeg入門詳解:音視頻原理及應用
- Python Data Analysis Cookbook
- OpenStack Orchestration
- Python編程從0到1(視頻教學版)
- Java編程的邏輯
- Java面向對象程序設計
- 軟件供應鏈安全:源代碼缺陷實例剖析
- 計算機應用基礎教程(Windows 7+Office 2010)
- Python機器學習與量化投資
- Mastering Drupal 8
- Spring Web Services 2 Cookbook