docker部署mysql问题汇总

docker-compose 配置 version: '3' services: # mysql blog_mysql: image: mysql restart: always ports: - '3306:3306' environment: - MYSQL_ROOT_PASSWORD=xxxx volumes: - '/data/mysql:/var/lib/mysql' docker 安装完mysql 后客户端无法访问 进入镜像中的mysql docker exec -it container_id /bin/bash 登录mysql mysql -u root -p 修改root账号, 可以通过任何客户端连接 ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'xxxxx';

May 9, 2020 · 1 min · zakudriver

myclirc

# vi: ft=dosini [main] # Enables context sensitive auto-completion. If this is disabled the all # possible completions will be listed. smart_completion = True # Multi-line mode allows breaking up the sql statements into multiple lines. If # this is set to True, then the end of the statements must have a semi-colon. # If this is set to False then sql statements can't be split into multiple # lines. End of line (return) is considered as the end of the statement....

December 10, 2019 · 3 min · zakudriver