8.0.28 由于它的发布日期只有几天前,我无法安装它,因为它还没有出现在官方的 ubuntu 仓库中。我也不知道如何手动安装它。我尝试了互联网上的各种指南,但似乎都没有用。我得到的只是无休止的错误。
那么有人知道如何在 Ubuntu 20.04 上手动安装版本 8.0.28 吗?或者知道我可以添加的任何最新存储库吗?
编辑
错误如下
dpkg -i libmysqlclient-dev_8.0.28-1ubuntu20.04_amd64.deb
Selecting previously unselected package libmysqlclient-dev.
(Reading database ... 165702 files and directories currently installed.)
Preparing to unpack libmysqlclient-dev_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking libmysqlclient-dev (8.0.28-1ubuntu20.04) ...
dpkg: dependency problems prevent configuration of libmysqlclient-dev:
libmysqlclient-dev depends on libmysqlclient21 (= 8.0.28-1ubuntu20.04); however:
Version of libmysqlclient21:amd64 on system is 8.0.27-0ubuntu0.20.04.1.
dpkg: error processing package libmysqlclient-dev (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
libmysqlclient-dev
sudo dpkg -i mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb
Selecting previously unselected package mysql-community-client.
dpkg: considering removing mysql-client-8.0 in favour of mysql-community-client ...
dpkg: no, cannot proceed with removal of mysql-client-8.0 (--auto-deconfigure will help):
mysql-server-8.0 depends on mysql-client-8.0 (>= 8.0.27-0ubuntu0.20.04.1)
mysql-client-8.0 is to be removed.
dpkg: regarding mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb containing mysql-community-client:
mysql-community-client conflicts with mysql-client-8.0
mysql-client-8.0 (version 8.0.27-0ubuntu0.20.04.1) is present and installed.
dpkg: error processing archive mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb (--install):
conflicting packages - not installing mysql-community-client
Errors were encountered while processing:
mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb
根据要求提供终端信息。
apt-cache policy mysql-client-8.0 mysql-community-client
mysql-client-8.0:
Installed: 8.0.27-0ubuntu0.20.04.1
Candidate: 8.0.27-0ubuntu0.20.04.1
Version table:
*** 8.0.27-0ubuntu0.20.04.1 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
100 /var/lib/dpkg/status
8.0.19-0ubuntu5 500
500 http://nova.clouds.archive.ubuntu.com/ubuntu focal/main amd64 Packages
mysql-community-client:
Installed: (none)
Candidate: (none)
Version table:
答案1
答案2
只需下载并准备好您需要的特定版本
root@mytestserver:/pkg/mysql8#
DEBIAN/ mysql-community-client-core_8.0.28-1ubuntu20.04_amd64.deb
libmysqlclient21_8.0.28-1ubuntu20.04_amd64.deb mysql-community-client-plugins_8.0.28-1ubuntu20.04_amd64.deb
mysql-client_8.0.28-1ubuntu20.04_amd64.deb mysql-community-server_8.0.28-1ubuntu20.04_amd64.deb
mysql-common_8.0.28-1ubuntu20.04_amd64.deb mysql-community-server-core_8.0.28-1ubuntu20.04_amd64.deb
mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb
使用 astrek 安装**
root@mytestserver:/pkg/mysql8# dpkg -i mysql-c*
Selecting previously unselected package mysql-client.
(Reading database ... 239805 files and directories currently installed.)
Preparing to unpack mysql-client_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-client (8.0.28-1ubuntu20.04) ...
Preparing to unpack mysql-common_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-common (8.0.28-1ubuntu20.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack mysql-community-client_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-community-client (8.0.28-1ubuntu20.04) ...
Selecting previously unselected package mysql-community-client-core.
Preparing to unpack mysql-community-client-core_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-community-client-core (8.0.28-1ubuntu20.04) ...
Selecting previously unselected package mysql-community-client-plugins.
Preparing to unpack mysql-community-client-plugins_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-community-client-plugins (8.0.28-1ubuntu20.04) ...
Preparing to unpack mysql-community-server_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-community-server (8.0.28-1ubuntu20.04) over (8.0.28-1ubuntu20.04) ...
Selecting previously unselected package mysql-community-server-core.
Preparing to unpack mysql-community-server-core_8.0.28-1ubuntu20.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.28-1ubuntu20.04) ...
Setting up mysql-common (8.0.28-1ubuntu20.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up mysql-community-client-plugins (8.0.28-1ubuntu20.04) ...
Setting up mysql-community-server-core (8.0.28-1ubuntu20.04) ...
Setting up mysql-community-client-core (8.0.28-1ubuntu20.04) ...
Setting up mysql-community-client (8.0.28-1ubuntu20.04) ...
Setting up mysql-client (8.0.28-1ubuntu20.04) ...
Setting up mysql-community-server (8.0.28-1ubuntu20.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Created symlink /etc/systemd/system/multi-user.target.wants/mysql.service → /lib/systemd/system/mysql.service.
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
版本检查
root@mytestserver:/pkg/mysql8# mysql --version
mysql Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)
服务检查
root@mytestserver:/pkg/mysql8# systemctl status mysql.serv
mysql.server.service mysql.service
root@mytestserver:/pkg/mysql8# systemctl status mysql.server.service
● mysql.server.service - LSB: start and stop MySQL
Loaded: loaded (/etc/init.d/mysql.server; generated)
Active: active (exited) since Thu 2022-09-01 13:19:30 +04; 2h 3min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 9439)
Memory: 0B
CGroup: /system.slice/mysql.server.service
Sep 01 13:19:27 mytestserver systemd[1]: Starting LSB: start and stop MySQL...
Sep 01 13:19:27 mytestserver mysql.server[3066]: Starting MySQL
Sep 01 13:19:27 mytestserver mysql.server[3066]: .
Sep 01 13:19:27 mytestserver mysql.server[3096]: Logging to '/usr/local/mysql/data/mytestserver.err'.
Sep 01 13:19:30 mytestserver mysql.server[3066]: .. *
Sep 01 13:19:30 mytestserver systemd[1]: Started LSB: start and stop MySQL.
登录检查
root@mytestserver:/pkg/mysql8# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
4 rows in set (0.00 sec)
mysql> quit
Bye
root@mytestserver:/pkg/mysql8#