Meu arquivo de soquete desapareceu do diretório /var/run/mysqld/
, então pensei em reinstalar tudo. Eu fiz
apt-get remove --purge mysql-client mysql-client-5.5 mysql-client-core-5.5
mysql-servermysql-server-core-5.5 mysql-common
para remover todos os componentes. Então eu fiz um apt-get install mysql-server
. Mostra pacotes adicionais a serem adicionados. Durante a instalação, o diálogo de confguração do mysql-server 5.5 aparece e pede a senha do root. Eu tentei adicionar minha senha inteira (ou até mesmo nenhuma senha). mas a configuração falha e mostra 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
seguido por
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)
Se eu tentar 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.
E, novamente, a caixa aparece, pede senha e assim por diante.
/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.
Em seguida, eu até fiz um chown mysql.mysql -R /var/lib/mysql/
mas não usei.
/varlog/syslog
contents
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
Tags mysql ubuntu-12.04