mysql: job failedded to start. mysqld.sock está faltando

2

Como posso consertar isso e iniciar o servidor mysql?

Depois que o /etc/init.d/mysql start ou service mysql start eu recebo a mensagem start: "Job failed to start" E depois do # mysqld eu recebo isto:

mysqld
121123 11:33:33 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
121123 11:33:33 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Unknown error 1146
121123 11:33:33 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
121123 11:33:33 InnoDB: The InnoDB memory heap is disabled
121123 11:33:33 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121123 11:33:33 InnoDB: Compressed tables use zlib 1.2.3.4
121123 11:33:33 InnoDB: Initializing buffer pool, size = 128.0M
121123 11:33:33 InnoDB: Completed initialization of buffer pool
121123 11:33:33 InnoDB: highest supported file format is Barracuda.
121123 11:33:33  InnoDB: Waiting for the background threads to start
121123 11:33:34 InnoDB: 1.1.8 started; log sequence number 1595675
121123 11:33:34 [ERROR] Aborting
121123 11:33:34  InnoDB: Starting shutdown...
121123 11:33:35  InnoDB: Shutdown completed; log sequence number 1595675
121123 11:33:35 [Note]

Eu tento fazer o que o mysql me diz para fazer:

mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

E sim, / var / run / mysql está vazio:

mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck' with connection arguments: '--port=3306' '--socket=/var/run/mysqld/mysqld.sock' 
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) when trying to connect
FATAL ERROR: Upgrade failed

E este é o meu arquivo /etc/mysql/my.cnf

# cat /etc/mysql/my.cnf |grep sock
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
socket      = /var/run/mysqld/mysqld.sock
socket      = /var/run/mysqld/mysqld.sock
socket      = /var/run/mysqld/mysqld.sock

Então eu tento reinstalar o mysql do cero:

  apt-get purge mysql-client mysql-common mysql-server
  rm -R /var/lib/mysql
  rm -R /etc/mysql
  rm -R /var/run/mysqld
  userdel mysql
  apt-get install mysql-server mysql-client

Então, depois de digitar minha senha root para o mysql, recebo este erro:

 | Unable to set password for the MySQL "root" user                              │  
 │                                                                               │  
 │ 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.                     │  
 │                                                                               │  
 │ You should check the account's password after the package installation.       │  
 │                                                                               │  
 │ Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more   │  
 │ information.

E mais uma vez não consigo iniciar o mysql recebendo as mesmas mensagens.

    
por Freefri 23.11.2012 / 11:48

2 respostas

2

Provavelmente você está correndo em uma dependência circular de o MySQL não ser capaz de iniciar e executar os scripts de configuração do Debian em uma tentativa de consertar isso requer que o MySQL esteja rodando.

Tente reinicializar seu diretório de dados 'offline' usando mysql_install_db .

    
por 23.11.2012 / 12:09
0

Primeiro de tudo você não deve ter 3 arquivos socket em seu my.cnf

tente o seguinte:

dpkg-reconfigure mysql-server

Você será solicitado (prometido) a definir uma senha para o usuário root. Boa sorte

    
por 23.11.2012 / 12:02

Tags