Мой файл сокета пропал из каталога /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