- 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
推薦閱讀
- Advanced Machine Learning with Python
- Visual C++程序設計教程
- Arduino by Example
- Developing Middleware in Java EE 8
- Lua程序設計(第4版)
- Python Network Programming Cookbook(Second Edition)
- Haxe Game Development Essentials
- 零基礎入門學習Python(第2版)
- C/C++程序員面試指南
- C++20高級編程
- 軟件工程與UML案例解析(第三版)
- Jenkins 2.x實踐指南
- Node.js進階之路
- Python 3.8編程快速入門
- 深入理解Android:WebKit卷