MySQL 卸载损坏

MySQL 卸载损坏

我的套接字文件从目录中丢失了,/var/run/mysqld/所以我想重新安装整个东西。我做到了

apt-get remove --purge mysql-client mysql-client-5.5 mysql-client-core-5.5
mysql-servermysql-server-core-5.5 mysql-common

删除所有组件。然后我做了一个apt-get install mysql-server。它显示要添加的其他包。在安装过程中,mysql-server 5.5配置对话框弹出并要求输入root密码。我尝试添加我的整个密码(甚至没有密码)。但配置失败并显示An error occurred while setting the password for the MySQL administrative user. This may have happened because the account already has a password, or because of a communication problem with the MySQL server

其次是 ,

130826 14:34:06 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
130826 14:34:06 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
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
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.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

如果我尝试,apt-get install --reinstall结果显示,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 12 not upgraded.
2 not fully installed or removed.

然后再次弹出框,要求输入密码等等。

/var/log/mysql/error.log

130826 15:08:33 [Note] Plugin 'FEDERATED' is disabled.
/usr/sbin/mysqld: Table 'mysql.plugin' doesn't exist
130826 15:08:33 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
130826 15:08:33 InnoDB: The InnoDB memory heap is disabled
130826 15:08:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130826 15:08:33 InnoDB: Compressed tables use zlib 1.2.3.4
130826 15:08:33 InnoDB: Initializing buffer pool, size = 128.0M
130826 15:08:33 InnoDB: Completed initialization of buffer pool
130826 15:08:33  InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

随后我甚至做了一些chown mysql.mysql -R /var/lib/mysql/但毫无用处的事情。

/varlog/syslog内容

Aug 26 14:15:13 mypcname kernel: [ 4825.238323] type=1400 audit(1377506713.644:344): apparmor="DENIED" operation="mknod" parent=19649 profile="/usr/sbin/mysqld" name="/home/var/lib/mysql/mypcname.lower-test" pid=19762 comm="mysqld" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Aug 26 14:15:13 mypcname mysqld_safe[19777]: 130826 14:15:13 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
Aug 26 14:15:13 mypcname mysqld_safe[19777]: 130826 14:15:13 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
Aug 26 14:15:13 mypcname mysqld_safe[19791]: 130826 14:15:13 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
Aug 26 14:15:13 mypcname mysqld_safe[19791]: 130826 14:15:13 [Warning] Can't create test file /var/lib/mysql/mypcname.lower-test
Aug 26 14:15:15 mypcname kernel: [ 4827.460241] init: mysql main process (19847) terminated with status 1
Aug 26 14:15:15 mypcname kernel: [ 4827.460270] init: mysql main process ended, respawning
Aug 26 14:15:16 mypcname kernel: [ 4828.436900] init: mysql post-start process (19848) terminated with status 1
Aug 26 14:15:16 mypcname kernel: [ 4828.496277] init: mysql main process (19885) terminated with status 1
Aug 26 14:15:16 mypcname kernel: [ 4828.496305] init: mysql main process ended, respawning
Aug 26 14:15:17 mypcname kernel: [ 4829.472938] init: mysql post-start process (19886) terminated with status 1
Aug 26 14:15:17 mypcname kernel: [ 4829.538673] init: mysql main process (19923) terminated with status 1
Aug 26 14:15:17 mypcname kernel: [ 4829.538700] init: mysql respawning too fast, stopped

相关内容