我安装了 18.04 am 的新副本,安装了所有需要的包。安装时mysql-server
,mysql-client
我收到以下错误
dpkg: error processing package mysql-server-5.7 (--configure):
installed mysql-server-5.7 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
我已经尝试过这个purge, autoremove, autoclean, dist-upgrade
例程,但它对我不起作用。
我该如何解决这个问题,请帮助
我通过访问MySQL APT Repository上的 Oracles mysql 文档解决了这个问题,这是一个巨大的帮助,按照页面上的所有说明,我可以
mysql
成功安装。我做了什么:
mysql-apt-conf
工具sudo dpkg -i /PATH/version-specific-package-name.deb
MySQL Server & Cluster
到您想要的任何内容时,请按 Enter 并选择其中之一,mysql-5.7
然后mysql-8.0
转到Ok
并按 Entersudo apt-get update
(此步骤仅适用于 Ubuntu 17.10 或更低版本)sudo apt install mysql-server
mysql_secure_installation
,这将为mysql配置密码和其他安全内容更新
如果有人运行或必须运行 mysql_secure_installation
sudo
,请注意,除非您使用 sudo,否则您可能无法登录 mysql。发生这种情况时,登录到 mysql 控制台会为 mysql 创建一个新用户,然后刷新所有权限。在此处检查此问题Connect to mysql server without sudo