como restaurar o meu mysql 5.1 no Ubuntu 10.4?

1

Estou com grandes problemas e não consigo acessar meu servidor mysql. depois de reiniciar

o mysql do grep / var / log / syslog está sendo exibido

Jul 30 14:30:23 of-desktop kernel: [ 4763.427066] type=1505 audit(1280480423.517:20):  operation="profile_replace" pid=11282 name="/usr/sbin/mysqld"
Jul 30 14:34:22 of-desktop kernel: [    8.780926] type=1505 audit(1280480662.866:5):  operation="profile_load" pid=803 name="/usr/sbin/mysqld"
Jul 30 14:34:24 of-desktop init: mysql main process (813) terminated with status 1
Jul 30 14:34:24 of-desktop init: mysql main process ended, respawning

enquanto dá o comando

sudo service mysql start

está pendurado.

ctrl + c terminará. novamente dando o mesmo comando é

start: Job is already running: mysql

grep -v '^ # "/etc/mysql/my.cnf

[client]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock
[mysqld]
port        = 3306
socket      = /var/run/mysqld/mysqld.sock
skip-locking
key_buffer_size = 384M
max_allowed_packet = 1M
table_open_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M
thread_concurrency = 8
log-bin=mysql-bin
server-id   = 1
[mysqldump]
quick
max_allowed_packet = 16M
 [mysql]
no-auto-rehash
[myisamchk]
key_buffer_size = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M
 [mysqlhotcopy]
interactive-timeout

dpkg -l | grep O mysql dá

ii  libdbd-mysql-perl                    4.012-1ubuntu1                                  A Perl5 database interface to the MySQL data
ii  libmysqlclient16                     5.1.41-3ubuntu12.3                              MySQL database client library
ii  libqt4-sql-mysql                     4:4.6.2-0ubuntu5                                Qt 4 MySQL database driver
ii  mysql-client                         5.1.41-3ubuntu12.3                              MySQL database client (metapackage depending
ii  mysql-client-5.1                     5.1.41-3ubuntu12.3                              MySQL database client binaries
ii  mysql-client-core-5.1                5.1.41-3ubuntu12.3                              MySQL database core client binaries
ii  mysql-common                         5.1.41-3ubuntu12.3                              MySQL database common files (e.g. /etc/mysql
ii  mysql-server                         5.1.41-3ubuntu12.3                              MySQL database server (metapackage depending
ii  mysql-server-5.1                     5.1.41-3ubuntu12.3                              MySQL database server binaries
ii  mysql-server-core-5.1                5.1.41-3ubuntu12.3                              MySQL database core server files
ii  php5-mysql                           5.3.2-1ubuntu4.2                                MySQL module for php5

grep mysql /var/log/daemon.log

Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
Jul 30 14:30:23 of-desktop mysqld[11230]: To do so, start the server, then issue the following commands:
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: /usr/bin/mysqladmin -u root password 'new-password'
Jul 30 14:30:23 of-desktop mysqld[11230]: /usr/bin/mysqladmin -u root -h of-desktop password 'new-password'
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: Alternatively you can run:
Jul 30 14:30:23 of-desktop mysqld[11230]: /usr/bin/mysql_secure_installation
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: which will also give you the option of removing the test
Jul 30 14:30:23 of-desktop mysqld[11230]: databases and anonymous user created by default.  This is
Jul 30 14:30:23 of-desktop mysqld[11230]: strongly recommended for production servers.
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: See the manual for more instructions.
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: Please report any problems with the /usr/bin/mysqlbug script!
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11230]: The latest information about MySQL is available at http://www.mysql.com/
Jul 30 14:30:23 of-desktop mysqld[11230]: Support MySQL by buying support/licenses from http://shop.mysql.com/
Jul 30 14:30:23 of-desktop mysqld[11230]: 
Jul 30 14:30:23 of-desktop mysqld[11263]: #007/usr/sbin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
Jul 30 14:30:23 of-desktop mysqld[11263]: 100730 14:30:23 [ERROR] Aborting
Jul 30 14:30:23 of-desktop mysqld[11263]: 
Jul 30 14:30:23 of-desktop mysqld[11263]: 100730 14:30:23 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 30 14:30:23 of-desktop mysqld[11263]: 
Jul 30 14:30:23 of-desktop mysqld[11271]: #007/usr/sbin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
Jul 30 14:30:23 of-desktop mysqld[11271]: 100730 14:30:23 [ERROR] Aborting
Jul 30 14:30:23 of-desktop mysqld[11271]: 
Jul 30 14:30:23 of-desktop mysqld[11271]: 100730 14:30:23 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 30 14:30:23 of-desktop mysqld[11271]: 
Jul 30 14:30:23 of-desktop mysqld[11275]: #007/usr/sbin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
Jul 30 14:30:23 of-desktop mysqld[11275]: 100730 14:30:23 [ERROR] Aborting
Jul 30 14:30:23 of-desktop mysqld[11275]: 
Jul 30 14:30:23 of-desktop mysqld[11275]: 100730 14:30:23 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 30 14:30:23 of-desktop mysqld[11275]: 
Jul 30 14:30:23 of-desktop mysqld[11279]: #007/usr/sbin/mysqld: File './mysql-bin.index' not found (Errcode: 13)
Jul 30 14:30:23 of-desktop mysqld[11279]: 100730 14:30:23 [ERROR] Aborting
Jul 30 14:30:23 of-desktop mysqld[11279]: 
Jul 30 14:30:23 of-desktop mysqld[11279]: 100730 14:30:23 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 30 14:30:23 of-desktop mysqld[11279]: 
Jul 30 14:34:24 of-desktop init: mysql main process (813) terminated with status 1
Jul 30 14:34:24 of-desktop init: mysql main process ended, respawning

qual pode ser o problema? obrigado ...

    
por Kumar 30.07.2010 / 11:14

4 respostas

1

Você marcou /var/log/daemon.log ? Talvez esteja ocupado reconstruindo / verificando tabelas corrompidas, pode demorar um pouco se ele falhar recentemente.

Você também pode tentar top , para ver se os processos mysql não estão ficando zumbis ou estagnados esperando por E / S (símbolo D, em vez de S), caso em que você pode ter um problema de disco rígido.

    
por 30.07.2010 / 11:26
1

Você alterou as configurações do MySQL antes de reiniciar? Por reinicialização, você quer dizer "Opa, meu servidor travou e durante a reinicialização o MySQL falhou ao inicializar" ou "Eu apenas tentei reiniciar o MySQL".

Duas coisas que você gostaria de verificar:

  • São permissões de arquivo sob / var / lib / mysql OK? O usuário do MySQL é capaz de chegar lá? Aqui está meu / var / lib / mysql no Ubuntu 10.04:

    drwx------  4 mysql mysql 4.0K 2010-07-28 20:42 .
    drwxr-xr-x 68 root  root  4.0K 2010-07-28 15:13 ..
    -rw-r--r--  1 root  root     0 2010-07-28 13:04 debian-5.1.flag
    -rw-rw----  1 mysql mysql  10M 2010-07-28 20:42 ibdata1
    -rw-rw----  1 mysql mysql 5.0M 2010-07-28 20:42 ib_logfile0
    -rw-rw----  1 mysql mysql 5.0M 2010-07-28 13:04 ib_logfile1
    drwx------  2 mysql root  4.0K 2010-07-28 13:04 mysql
    
  • Você alterou os caminhos em /etc/mysql/my.cnf ? Talvez o MySQL esteja procurando por mysql-bin.index do lugar errado?

por 30.07.2010 / 11:47
0

Tente definir o datadir no seu my.cnf, geralmente datadir = / var / lib / mysql.

    
por 30.07.2010 / 11:50
0

Eu encontrei o problema. Ontem eu instalei lula depois que eu desativado it.so não há problema. quando eu reiniciar o squid habilitado automaticamente e bloqueando o mysql (eu acho). agora eu removo totalmente, e agora o mysql está funcionando. Eu não sei porque. Mas o problema é devido a lula. Obrigado por me ajudar. com amor kumar.

    
por 30.07.2010 / 12:33