![]() ![]() Let’s say you work at an organization where most developers are using Windows with WSL 2, Intel MBPs and native Linux but you start to have a few folks using M1+ MBPs. Once the server is ready, you can run the mysql client within the MySQL Server container you just started, and connect it to the MySQL Server. You can tell if it’s supported by looking in the list of tags on the Docker Hub under the OS/ARCH column. If you are using Docker-for-Linux 20.10. I’ve left the original tip below unedited for historic purposes and to demo how you can set dynamic Docker images based on an environment variable.Īs of mid-2021 the official MySQL image doesn’t support ARM 64 CPUs which includes Apple’s M1+ line of Macs. Edit: If you are using Docker-for-mac or Docker-for-Windows 18.03+, connect to your mysql service using the host (instead of the 127.0.0.1 in your connection string). There’s no arm64 support for MySQL 5.7 but that’s coming up for end of life in October 2023. Docker will pull the correct one for your system without having to do anything extra! If you want to run your MySQL 8.0 Docker instance using mysqlnativepassword authentication rather than the default cachingsha2password method, then refer to my other article, How to Run. Update as of late 2022: Good news! MySQL 8+ now supports amd64 and arm64 CPU architectures out of the box. ![]() If you prefer video, I recorded a demo video going over what’s written below. docker run -name some-mysql -v /my/custom:/etc/mysql/conf.d -e MYSQLROOTPASSWORDmy-secret-pw -d mysql:tag This will start a new container some-mysql where the MySQL instance uses the combined startup settings from /etc/mysql/my.cnf and /etc/mysql/conf.d/config-file.cnf, with settings from the latter taking precedence. Updated on January 29th, 2023 in #docker Docker Tip #88: Switching MySQL to MariaDB for ARM 64 (M1) Support Here's one way to support switching between MySQL and MariaDB with an environment variable. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |