(请在这篇文章的结尾处查看这个问题的解决方案)
我有一个新安装的服务器,ubuntu16.04.1。然后,我按照MariaDB网站上的指导方针安装了MariaDB。然后重新启动服务器。/etc/apt/ shows . line显示了MariaDB的下一行:
deb [arch=i386,amd64,ppc64el] http://ftp.nluug.nl/db/mariadb/repo/10.1/ubuntu xenial main当我现在做apt-get update时,它确实显示了回购:
...
Get:6 http://ftp.nluug.nl/db/mariadb/repo/10.1/ubuntu xenial/main i386 Packages [5,580 B]
Get:7 http://ftp.nluug.nl/db/mariadb/repo/10.1/ubuntu xenial/main amd64 Packages [5,577 B]
Get:8 http://ftp.nluug.nl/db/mariadb/repo/10.1/ubuntu xenial/main ppc64el Packages [5,592 B]下一步是一个apt-get dist-upgrade,它向我展示了许多已经过时的软件包(galera,mariadb-常见的.)和一些要删除的包(比如mariadb服务器).这很奇怪因为我从来没要求移除那些包裹..。
The following packages were automatically installed and are no longer required:
galera-3 iproute libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl
libjemalloc1 liblwp-mediatypes-perl libmariadbclient18 libmysqlclient18 libmysqlclient20 libterm-readkey-perl
libtimedate-perl liburi-perl mariadb-common mysql-common socat
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server mariadb-server-10.0 mariadb-server-core-10.0
The following packages will be upgraded:
mariadb-common mysql-common
2 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.但是..。为了测试会发生什么,我接受了升级。升级之后,sources.list仍然显示了Mariadb的行,因为它是在这篇文章的开头。但是..。当我现在做apt-get update时..。mariadb没有更多的结果(再次奇怪.)
# apt-get update
Hit:1 http://ftp.nluug.nl/db/mariadb/repo/10.1/ubuntu xenial InRelease
Hit:2 http://nl.archive.ubuntu.com/ubuntu xenial InRelease
Hit:3 http://nl.archive.ubuntu.com/ubuntu xenial-updates InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
Hit:5 http://nl.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 94.5 kB in 0s (290 kB/s)
Reading package lists... Done还有..。因为dist升级确实删除了mysql服务器,我也不能再连接到数据库了。
留给我一个大问题..。我在16.04.1上安装的MariaDB发生了什么?
还有..。为了好玩,我又用命令apt-get install mariadb-server安装了mariadb服务器,但是.当我试图连接到数据库时,这导致了另一个错误:
# mysql -u root -p
Enter password:
ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded===我做错了什么,===
在经历了一些挣扎之后,我的眼睛注意到了mariadb在dist升级之前和dist升级之后发布的不同。
结果我的自动脚本安装mariadb后“忘记”做一个apt-get update后,我添加了回购。这导致安装了股票版本10.0而不是想要的10.1。
然后,当您在稍后阶段进行升级时,它将看到它实际上需要10.1,因此它将删除10.0版本。既然是我创造了这个很好的脚本来安装mariadb..。我只能怪自己:-)
发布于 2016-08-19 16:58:41
正如编辑的线程中所述,该问题是由mariadb的错误安装引起的(忘记了apt-get更新)。安装正确的版本,并遵循来自Sin吓人的建议,确实做到了这一点。
https://askubuntu.com/questions/810998
复制相似问题