Ubuntu24 mysql5.7
跳到导航
跳到搜索
apt-get remove --purge mysql-apt-config sudo apt install libaio1t64 #这个应该可以不要 wget http://archive.ubuntu.com/ubuntu/pool/main/liba/libaio/libaio1_0.3.110-5_amd64.deb sudo dpkg -i libaio1_0.3.110-5_amd64.deb wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb sudo apt install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb sudo apt-get purge 'mariadb-*' sudo apt-get autoremove sudo apt-get autoclean cat /etc/mysql/my.cnf [mysqld] character-set-server=utf8 collation-server=utf8_general_ci max_allowed_packet=16M interactive_timeout=2600000 wait_timeout=2600000 [client] default-character-set=utf8 [mysql] default-character-set=utf8
https://medium.com/@doobie-droid/how-to-install-mysql-5-0-on-ubuntu-20-04-or-later-4d27de464eef
https://askubuntu.com/questions/227791/how-do-i-install-libaio
https://askubuntu.com/questions/1531760/how-to-install-libtinfo5-on-ubuntu24-04
https://askubuntu.com/questions/1335720/cannot-install-mysql-server
docker compose
如果使用 Docker 部署 MySQL 5.7 示例(带上述参数) # docker-compose.yml version: '3.1' services: mysql: image: mysql:5.7 container_name: mysql57 environment: MYSQL_ROOT_PASSWORD: yourpassword ports: - "3306:3306" volumes: - mysql_data:/var/lib/mysql command: --character-set-server=utf8 --collation-server=utf8_general_ci --max_allowed_packet=16777216 --wait_timeout=2600000 --interactive_timeout=2600000 volumes: mysql_data: