Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-compose里mysql版本过高 #69

Closed
Andrew8102 opened this issue Dec 2, 2024 · 3 comments
Closed

docker-compose里mysql版本过高 #69

Andrew8102 opened this issue Dec 2, 2024 · 3 comments

Comments

@Andrew8102
Copy link

Andrew8102 commented Dec 2, 2024

mysql默认版本已经到8了,于是用作者默认的docker-compose构建会出现以下错误:

2024-12-02 23:38:34 2024-12-02T15:38:34.036123Z 0 [ERROR] [MY-000067] [Server] unknown variable 'default-authentication-plugin=mysql_native_password'.
2024-12-02 23:38:34 2024-12-02T15:38:34.036582Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
2024-12-02 23:38:34 2024-12-02T15:38:34.036614Z 0 [ERROR] [MY-010119] [Server] Aborting

docker-compose.yml里,将其中mysql修改为5.7版本的mysql就正常了,在image后标注具体安装的版本号即可,同时根据issue53,对mysql进行提权操作

mysql:
    container_name: film_mysql
    image: mysql:5.7
    privileged: true 
    ports:
    - 3610:3306
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: FilmSite
    networks:
      - film-network
    command: [
          'mysqld',
          '--default-authentication-plugin=mysql_native_password',
          '--innodb-buffer-pool-size=80M',
          '--character-set-server=utf8mb4',
          '--collation-server=utf8mb4_unicode_ci',
          '--default-time-zone=+8:00',
          '--lower-case-table-names=1'
        ]
@ProudMuBai
Copy link
Owner

最新的文件里面有对MySQL容器的common做修改,一直都是用的MySQL8,只是最新版的镜像不兼容旧指令,用主页的最新文件就可以了

@ProudMuBai
Copy link
Owner

docker-compose.yml文件中的内容也可以按照服务器规格的不同进行修改,演示站点我配置就1h1g左右,所以设置的参数都比较低,有cpu架构和其它原因导致的问题都可以提issues或者到tg私聊我,还有就是安装部署的时候不要用tags里面的包(这个tag是版本交替的记录文件),直接用项目主页的filn文件内容就可以

@Andrew8102
Copy link
Author

好的,感谢,才知道是mysql8代指令有变化,这个issue可以关闭了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants