【问题标题】:Cannot install mysql-server 5.7 on ubuntu 16.04无法在 ubuntu 16.04 上安装 mysql-server 5.7
【发布时间】:2020-07-26 19:02:25
【问题描述】:

请注意,我无法在 Ubuntu 上安装 mysql-server。这就是我所看到的。

user@MyServer:~/Install$ sudo apt-get install mysql-server mysql-client
Reading package lists... Done
Building dependency tree       
Reading state information... Done
mysql-server is already the newest version (5.7.29-0ubuntu0.16.04.1).
The following NEW packages will be installed:
  mysql-client
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 10.1 kB of archives.
After this operation, 110 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 mysql-client all 5.7.29-0ubuntu0.16.04.1 [10.1 kB]
Fetched 10.1 kB in 0s (32.6 kB/s)       
Selecting previously unselected package mysql-client.
dpkg: warning: files list file for package 'apache2-bin' missing; assuming package has no files currently installed
(Reading database ... 365868 files and directories currently installed.)
Preparing to unpack .../mysql-client_5.7.29-0ubuntu0.16.04.1_all.deb ...
Unpacking mysql-client (5.7.29-0ubuntu0.16.04.1) ...
Setting up mysql-server-5.7 (5.7.29-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
mysql_upgrade: Got error: 1524: Plugin 'unix_socket' is not loaded while connecting to the MySQL server
Upgrade process encountered error and will not continue.
mysql_upgrade failed with exit status 11
dpkg: error processing package mysql-server-5.7 (--configure):
 subprocess installed post-installation script 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
Setting up mysql-client (5.7.29-0ubuntu0.16.04.1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          Errors were encountered while processing:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

到目前为止,我一直在研究这些链接,但没有发现任何有用的东西。

https://computingforgeeks.com/how-to-solve-error-1524-hy000-plugin-unix_socket-is-not-loaded-mysql-error-on-debian-ubuntu/ Issues on reinstalling MySQL 5.7 server on Ubuntu 16.04 Issue installing mysql server on ubuntu 16.04

有人有什么建议吗? TIA。

更新:

请注意,最后我选择使用 MariaDB,因为它在 Ubuntu 16.04 上安装和卸载没有问题,但是当我尝试安装和卸载 MySQL 时,我最终遇到了一堆错误。

【问题讨论】:

    标签: mysql ubuntu ubuntu-16.04


    【解决方案1】:

    这看起来像是在安装 MySQL 而不是以前的 MariaDB 安装。

    不支持这种形式的安装。建议从 MariaDB 转储数据(使用在数据目录上运行的 mariadb)(mysqldump)并手动移植 mysql.* 表内容(创建用户和 grants(,备份并移动 /var/lib/mysql 数据目录,然后重试安装。

    或者继续使用 MariaDB。

    【讨论】:

    • 好的,我做了这个命令,但它仍然不允许我安装 mysql-server: "$ sudo apt-get remove --auto-remove mariadb-server" 有没有办法可以删除 MariaDB只需安装mysql-server?我不关心 MariaDB 中的任何数据。
    • rm -rf /var/lib/mysql。 mysql的包中的额外工作是因为datadir有内容。
    • 我也做了这个命令来确保所有的 MariaDB 数据库都被删除了:"$ sudo apt-get remove --purge mariadb*"
    • 更正,完整的命令是 sudo apt remove --purge mariadb\*
    猜你喜欢
    • 2017-11-13
    • 2023-04-10
    • 2018-06-09
    • 1970-01-01
    • 2017-05-01
    • 1970-01-01
    • 2020-05-01
    • 2018-04-06
    • 1970-01-01
    相关资源
    最近更新 更多