解决为知笔记docker镜像部署后登录连接mysql报错
https://www.wiz.cn/zh-cn/docker
部署正常后登录一切正常,但开机重启后登录用户名时报错,是和非正常退出程序导致mysql sock锁,清除该锁文件后恢复正常。
1 C:\Users\DELL>docker ps 2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3 853d0aac9390 wiznote/wizserver "bash /wiz/app/entry…" 13 hours ago Up 3 minutes 0.0.0.0:9269->9269/udp, 0.0.0.0:8080->80/tcp wiz 4 5 C:\Users\DELL>docker exec -it 853d0aac9390 /bin/bash 6 [root@853d0aac9390 /]# find / -name mysql.sock.lock 7 /var/lib/mysql/mysql.sock.lock 8 [root@853d0aac9390 /]# mv /var/lib/mysql/mysql.sock.lock /var/lib/mysql/mysql.sock.lock.bak 9 [root@853d0aac9390 /]# exit 10 exit 11 12 C:\Users\DELL>docker restart 853d0aac9390 13 853d0aac9390
为知笔记的本地版可以作为本地存储文件使用。