background
Start the MySQL container by running the local MAC docker
docker run -d -p 3306:3306 --name mysql1 -v /Users/polo/data/conf:/etc/mysql/conf.d -v /Users/polo/data/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
phenomenon
Check the container log and find that an error is reported, and the local Navicat cannot be connected
Root cause
Files already exist in the directory mounted through – V, so when – V selects the local directory, remember to select an empty directory/nonexistent directory (it will be created automatically)
Solution
Reference links for problem solving
Replace the -v mounted local directory with an empty directory/nonexistent directory
Start the log of MySQL container normally
No error log
Similar Posts:
- Docker Run Mysql Container Error: [ERROR] InnoDB: redo log file ‘./ib_logfile0’ exists
- Job for docker.service failed because the control process exited with error code. See “syste…
- [Solved] Gitlab can clone via SSH, cannot clone via HTTP, and cannot pipeline. Prompt port 80: connection rejected
- Docker startup container Error response from daemon: OCI runtime create failed: container_ linux.go:349
- Docker Desktop: Error response from daemon: driver failed programming external connectivity on en…
- MySQLAccess denied for user ‘root’@’localhost’ [How to Solve]
- ERROR 2059 (HY000): Authentication plugin ‘caching_sha2_password’ cannot be loaded
- docker: Error response from daemon: Conflict. The container name “/xx” is already in use
- How to Solve MySQL Startup error: mysql-bin.index not found (Errcode: 13)
- [Solved] Bind for 0.0.0.0:80 failed: port is already allocated