2012-03-12 2 views
0

/etc/my.cnf에 "ready"mysql 구성 파일 (/usr/local/share/mysql/my-huge.cnf)을 복사 한 다음 mysql 서버를 다시 시작하고 unfortunatelly 중지 할 때까지 내 mysql 서버를 시작하는 데 문제가 있습니다. 다시 시작하는 대신.mysql 서버를 시작할 수 없습니다

나는 어떤 콘솔 오류를 해달라고하지만,이 내 /var/db/mysql/hostname.pid 파일에 나타납니다

120312 17:57:43 mysqld_safe mysqld from pid file /var/db/mysql/hostname.pid ended 
120312 17:58:09 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 
120312 17:58:09 InnoDB: The InnoDB memory heap is disabled 
120312 17:58:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
120312 17:58:09 InnoDB: Compressed tables use zlib 1.2.3 
120312 17:58:09 InnoDB: Initializing buffer pool, size = 128.0M 
120312 17:58:09 InnoDB: Completed initialization of buffer pool 
120312 17:58:09 InnoDB: highest supported file format is Barracuda. 
InnoDB: The log sequence number in ibdata files does not match 
InnoDB: the log sequence number in the ib_logfiles! 
120312 17:58:09 InnoDB: Database was not shut down normally! 
InnoDB: Starting crash recovery. 
InnoDB: Reading tablespace information from the .ibd files... 
InnoDB: Restoring possible half-written data pages from the doublewrite 
InnoDB: buffer... 
120312 17:58:09 InnoDB: Assertion failure in thread 34387018176 in file fsp0fsp.c line 2040 
InnoDB: Failing assertion: inode 
InnoDB: We intentionally generate a memory trap. 
InnoDB: Submit a detailed bug report to http://bugs.mysql.com. 
InnoDB: If you get repeated assertion failures or crashes, even 
InnoDB: immediately after the mysqld startup, there may be 
InnoDB: corruption in the InnoDB tablespace. Please refer to 
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html 
InnoDB: about forcing recovery. 
17:58:09 UTC - mysqld got signal 6 ; 
This could be because you hit a bug. It is also possible that this binary 
or one of the libraries it was linked against is corrupt, improperly built, 
or misconfigured. This error can also be caused by malfunctioning hardware. 
We will try our best to scrape up some info that will hopefully help 
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail. 

key_buffer_size=8388608 
read_buffer_size=131072 
max_used_connections=0 
max_threads=151 
thread_count=0 
connection_count=0 
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338444 K bytes of memory 
Hope that's ok; if not, decrease some variables in the equation. 

120312 17:58:09 mysqld_safe mysqld from pid file /var/db/mysql/hostname.pid ended 

무슨 잘못?

+0

이전 cnf 파일을 백업합니다. 서버의 구성이 my-huge.cnf와 일치하지 않습니다. ib_data 파일에서 서버를 백업하려고 할 때 Linux와 비슷한 오류가 발생합니다. MyISAM은 잘 동작하지만 innodb는 테이블을 구성하기 위해 다른 파일을 사용하기 때문에 ... – B4NZ41

답변

1

ibdata 파일의 크기가 잘못되었습니다.

더 정확히 말하면, ibdata 파일은 새로운 my.cnf 파일에서 지정한 파일 크기와 다릅니다. my.cnf 파일의 이전 버전과 새 버전에서 ibdata (및 bin 로그 파일이있는 상태에서)의 값을 확인하십시오. 차이점을 알 수 있습니다.

당신은 이 있습니다. 이전 값을 사용하여 db를 시작할 수 있습니다. 거기에있는 다른 innodb 값도 확인하십시오 : 중요한 모든 것들을 동일하게 만드십시오 (작업을 마친 후에 다시 변경하게 될 것입니다). 일단 시작했으면 dbs를 덤프하고 mysqld를 종료하십시오. my.cnf 파일을 편집하고 ibdata를 삭제하고 db를 다시 시작한 다음 dbs를 다시 가져옵니다. Presto - 고정.

+0

음, 로그 파일,'ibdata' 파일, 그리고 마지막으로'my.cnf' 파일을 제거 할 때 매우 이상합니다 ... mysql은 쳐다 보지 만, 왜 NO config로 시작합니까? 어떤 설정 파일을'/ etc'에두면, 문제가 있습니다 ... – Cyclone

+0

설정 파일이 없다면, mysqld는 모든 기본값으로 시작하기 때문에 설정 파일이 없어도 괜찮습니다. 난 당신이 작업의 순서를 잘해야한다고 생각 : 백업 (ibdata 파일에 데이터가 있기 때문에), ibdata 및 ib_logfile [01]을 삭제, 당신이 원하는 설정을 시작 설정 - 그리고 당신은 그것을 작동하게됩니다. 데이터를 새로 고침하면 모든 설정이 완료됩니다. –

0

my.cnf 파일이 불량하거나 잘못된 항목이있는 것 같습니다. my-huge.cnf로 대체 한 my.cnf 사본을 가지고 있습니까? 나는 두 파일을 비교해보고 어떤 일이 일어나는지 보려고한다.

+1

my.cnf 파일이 아닙니다 - mysql 설치 후 나타나는 파일을 읽기 위해 기본적으로 아무 것도 없습니다. '/ etc /'에있는'my.cnf' 파일하지만 mysql 서버가 작동했습니다! 그런 다음 샘플 파일을 복사하고 문제를 시작하고이 파일을 제거하고 mysql 서버를 시작하려고 시도했습니다. 결과도없고이 서버 파일을 다른 서버에서 사용하고있는 것으로 바꾸려고 시도했지만 여전히 시작되지 않습니다. .. – Cyclone

0

아마도 Innodb 로그가 손상되었을 수 있습니다. 이 로그의 이름을 백업하고 mysqld를 다시 시작한 다음 mysqld가 새로운 로그를 생성하고 올바로 다시 시작해야한다.

+0

이미 당신이 말한 것을 시도해보십시오 - 결과가 없습니다. – Cyclone

관련 문제