无法在Ubuntu 12.04上安装mysql服务器

时间:2015-07-05 23:00:19

标签: mysql install ubuntu-12.04 uninstall

我在Ubuntu 12.04上安装mysql服务器失败了。这是我在删除 - 在mysql服务器的清除后尝试安装时看到的内容:

$ sudo apt-get install mysql-server-5.5 mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  tinyca mailx
The following NEW packages will be installed:
  mysql-server mysql-server-5.5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/8,861 kB of archives.
After this operation, 32.8 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 257077 files and directories currently installed.)
Unpacking mysql-server-5.5 
    (from .../mysql-server-5.5_5.5.43-0ubuntu0.12.04.1_amd64.deb) ...
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.5.43-0ubuntu0.12.04.1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-5.5 (5.5.43-0ubuntu0.12.04.1) ...
150705 15:38:03 [Warning] Using unique option prefix key_buffer instead of 
    key_buffer_size is deprecated and will be removed in a future release. 
    Please use the full name instead.
150705 15:38:03 [Note] /usr/sbin/mysqld (mysqld 5.5.43-0ubuntu0.12.04.1) 
    starting as process 14658 ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
No apport report written because the error message indicates its a followup 
    error from a previous failure.
            dpkg: error processing mysql-server-5.5 (--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.5; however:
  Package mysql-server-5.5 is not configured yet.
dpkg: error processing mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

安装了一个mysql客户端,但是当我尝试启动它时,我得到了这个: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

好吧,我没有得到StackExchange的帮助,所以我深入挖掘并自己弄清楚:首先我按照Removing MySQL 5.5 Completely的说明摆脱了mysql-server和mysql-client。然后我像往常一样用apt-get安装服务器和客户端。之后一切都很好。