Docker-Error reported after running Mysql container: [ERROR] InnoDB: redo log file ‘./ib_logfile0’ exists _

created at 10-18-2021 views: 12


Run and start the mysql container on 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


Check the container log and find that an error is reported, and the local Navicat cannot be connected

error message

The point is the first sentence, a file already exists, usually the environment is overwritten


Previously, mysql was installed through brew install, although it was uninstalled, the local files were not deleted


brew uninstall mysql
rm -rf /usr/local/var/mysql 

Uninstall mysql first, then delete the local files

created at:10-18-2021
edited at: 10-18-2021: