source

InnoDB: 이전에 열린 테이블스페이스를 열려고 했습니다.

factcode 2022. 10. 3. 17:11
반응형

InnoDB: 이전에 열린 테이블스페이스를 열려고 했습니다.

저는 며칠 전부터 문제를 해결하고 있습니다.박스 계정에 있는 우리 지역 미디어위키 페이지가 자폭해서 온라인화하려고 노력 중이야XAMPP Control Panel v3.2.1을 사용하면 오류가 너무 많아서 XAMPP(v3.2.2)를 업데이트하고 'htdocs' 및 'mysql/data' 파일을 새 데이터베이스로 이동하기로 결정했습니다.

첫 번째 오류:

    9:50:21 AM  [mysql]     Attempting to start MySQL app...
    9:50:22 AM  [mysql]     Status change detected: running
    9:50:22 AM  [mysql]     Status change detected: stopped
    9:50:22 AM  [mysql]     Error: MySQL shutdown unexpectedly.
    9:50:22 AM  [mysql]     This may be due to a blocked port, missing dependencies, 
    9:50:22 AM  [mysql]     improper privileges, a crash, or a shutdown by another method.
    9:50:22 AM  [mysql]     Press the Logs button to view error logs and check
    9:50:22 AM  [mysql]     the Windows Event Viewer for more clues
    9:50:22 AM  [mysql]     If you need more help, copy and post this
    9:50:22 AM  [mysql]     entire log window on the forums

그 후 로그에서 다음과 같은 내용을 확인했습니다.

    2015-11-20 09:50:22 11f8 InnoDB: Warning: Using      innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
    2015-11-20  9:50:22 4600 [Note] InnoDB: Using mutexes to ref count buffer pool pages
    2015-11-20  9:50:22 4600 [Note] InnoDB: The InnoDB memory heap is disabled
    2015-11-20  9:50:22 4600 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
    2015-11-20  9:50:22 4600 [Note] InnoDB: Memory barrier is not used
    2015-11-20  9:50:22 4600 [Note] InnoDB: Compressed tables use zlib 1.2.3
    2015-11-20  9:50:22 4600 [Note] InnoDB: Not using CPU crc32 instructions
    2015-11-20  9:50:22 4600 [Note] InnoDB: Initializing buffer pool, size = 16.0M
    2015-11-20  9:50:22 4600 [Note] InnoDB: Completed initialization of buffer pool
    2015-11-20  9:50:22 4600 [Note] InnoDB: Highest supported file format is Barracuda.
    2015-11-20  9:50:22 4600 [Note] InnoDB: The log sequence numbers 1665234 and 1665234 in ibdata files do not match the log sequence number 50125498 in the ib_logfiles!
    2015-11-20  9:50:22 4600 [Note] InnoDB: Database was not shutdown normally!
    2015-11-20  9:50:22 4600 [Note] InnoDB: Starting crash recovery.
    2015-11-20  9:50:22 4600 [Note] InnoDB: Reading tablespace information from the .ibd files...
    2015-11-20  9:50:22 4600 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace phpmyadmin/pma__tracking uses space ID: 21 at filepath: .\phpmyadmin\pma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .\wiki\archive.ibd
    InnoDB: Error: could not open single-table tablespace file .\wiki\archive.ibd
    InnoDB: We do not continue the crash recovery, because the table may become
    InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
    InnoDB: To fix the problem and start mysqld:
    InnoDB: 1) If there is a permission problem in the file and mysqld cannot
    InnoDB: open the file, you should modify the permissions.
    InnoDB: 2) If the table is not needed, or you can restore it from a backup,
    InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
    InnoDB: crash recovery and ignore that table.
    InnoDB: 3) If the file system or the disk is broken, and you cannot remove
    InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
    InnoDB: and force InnoDB to continue crash recovery here.

이 오류는 일반적인 오류처럼 보입니다.이 오류는 웹에서 해결 방법에 대한 다양한 제안과 함께 발견되었습니다.간략하게 검토하겠습니다.

내가 가장 먼저 시도한 것은 로그의 제안을 따르는 것이었다.

  1. 에는 권한 문제가 없었습니다.
  2. 테이블이 필요한지 아닌지 또는 phpmyadmin/pma_tracking 또는 archive.ibd 중 어느 쪽을 삭제할지 명확하지 않습니다.archive.ibd를 삭제했을 때 오류가 다른 .ibd 파일로 넘어갔습니다.
  3. my.cnf에 'innodb_force_recovery=1'이 추가되어 많은 오류가 발생합니다.

다음으로 새로운 데이터베이스를 구축했을 때 phpMyAdmin(localhost/phpMyAdmin)에 다음 오류가 발생하였습니다:phpMyAdmin 오류

이게 내 모든 문제의 원인인지 아닌지 모르겠어.비밀번호를 ='로 바꾸라는 말이 있었습니다.이 오류는 새 데이터베이스에 이전 데이터 폴더를 입력하는 중이기 때문에 발생할 수 있습니다.잘 모르겠어요.

웹상의 첫 번째 제안은 다음 파일을 에서 삭제하는 것이었습니다.

\mysql\data:
    innodb_index_stats.frm
    innodb_index_stats.ibd 
    innodb_table_stats.frm 
    innodb_table_stats.ibd 
    slave_master_info.ibd 
    slave_relay_log_info.frm 
    slave_relay_log_info.ibd 
    slave_worker_info.frm 
    slave_worker_info.ibd

두 번째:

'ibdata1'을 제거하려고 했습니다.

이 중 어느 것도 효과가 없었다.

저도 같은 문제가 있었어요.나는 다른 사람들이 제안한 모든 해결책을 시도해 보았지만, 안타깝게도 아무 것도 효과가 없었다.

구글에서 솔루션을 찾는 데 몇 시간을 소비한 후 마침내 이것을 발견했다.

  1. my.ini를 엽니다(Linux 기반 시스템과 Mac의 경우 my.cnf).
  2. [mysqld] 검색
  3. [mysqld] 바로 아래에 innodb_force_recovery 삽입 = 1
  4. MySQL 서비스 시작
  5. MySQL 서비스 중지
  6. my.ini에서 행을 제거합니다(innodb_force_recovery = 1)
  7. MySQL 서비스 시작

내 경우엔 완벽하게 작동했어

이것으로 당신의 문제가 해결되기를 바랍니다.

저도 같은 오류가 발생했어요.이게 제가 따라한 순서입니다.

  1. \xampp\mysql\data 백업을 작성했다.

  2. 이외의 모든 파일과 폴더를 데이터 폴더에서 삭제. mysql

  3. XAMPP를 종료하고 다시 시작.

  4. 를 「」에서 이동합니다.data폴더를 하나씩 표시합니다.

을 바꾸려고 /Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0로로 합니다./Applications/XAMPP/xamppfiles/var/mysql/ib_logfile0.bkp

★★★★★★★★★★★★★★★★★」/Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1로로 합니다./Applications/XAMPP/xamppfiles/var/mysql/ib_logfile1.bkp

솔루션은 MAC 10.11.3 El Captian용

  • /Applications/XAMPP/xamppfiles/var/mysql/로 이동합니다.
  • 모든 랜덤 파일 삭제(실제 데이터베이스 폴더 제외)
  • Apache 및 MySQL을 재시작합니다.

이건 나한테 효과가 있었어.

위의 (Nesar 솔루션)을 MAMP(버전 > = 4)에서 사용하려면 먼저 MAMP/tmp/mysql에 있는 my.cnf 파일을 MAMP/conf 폴더에 복사해야 합니다.그래야만 효과가 있을 것이다.

나도 Mamp Pro와 비슷한 문제가 있었다.올바른 .idb 파일이 "Applications/Mamp..."에 없는 것으로 판명되었습니다.따라서 에러 로그를 자세히 보면 파일이 "/Library/Application Support/appsolute/MAMP PRO/db"에 있는 것을 알 수 있습니다.사용하지 않는 데이터베이스에 문제가 있어 해당 폴더를 삭제하려고 하면 문제가 발생하였습니다.다음 단계는 작성자가 이미 언급한 파일을 삭제하는 것입니다.

  • innodb_index_module 입니다.프레임
  • innodb_index_dex.ibd
  • innodb_table_table.frm
  • innodb_table_table.ibd
  • slave_master_info.ibd
  • slave_slave_log_info.frm
  • slave_slave_log_info.ibd
  • slave_worker_info.frm
  • slave_worker_info.ibd

그러나 이미 언급한 바와 같이 데이터베이스 폴더 삭제는 잘 수행되었습니다.

Tgr의 답변은 적절해 보인다.권한 등에 대한 메시지는 일반 메시지입니다.실제 오류 메시지는 다음과 같습니다.

2015-11-20 9:50:22 4600 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace phpmyadmin/pma__tracking uses space ID: 21 at filepath: .\phpmyadmin\pma__tracking.ibd. Cannot open tablespace wiki/archive which uses space ID: 21 at filepath: .\wiki\archive.ibd

Wiki 데이터베이스와 phpmyadmin 데이터베이스가 같은 테이블스페이스 ID로 종료되었습니다.다른 하나가 없으면 둘 다 정상적으로 동작합니다.현재로서는 어떻게든 한쪽의 번호를 다시 매겨야 합니다.

"이전 열린 테이블스페이스를 열려고 했습니다." -- 다음 중 하나의 냄새가 납니다.

  • 두 개의 MySQL 복사본이 있으며 둘 다 실행하려고 합니다.
  • MySQL 파일 중 하나에서 '열림'을 해제하지 못했습니다.나는 그 문제를 보곤 했다.Windows 를 재기동해, 나중에 Windows 를 업그레이드하면, 이 문제가 해결되었습니다.

my.cnf를 적절히 편집할 수 없다는 것을 알게 된 MAMP Pro의 다른 문제 해결 방법:

InnoDB가 크래시되면 에러 메시지에서 문제의 원인이 되는 DB를 찾아냅니다. 있습니다.phpmyadmin/pma__tracking테이블은 pma_ 확장자를 가진 테이블입니다.

그럼 다음으로 넘어가겠습니다./Library/Application Support/appsolute/MAMP PRO/db/mysqlDB의 원인이 되는 문제의 이름을 딴 폴더를 삭제합니다.

MAMP 서버를 재기동합니다.정상적으로 재시작하면 서버를 다시 중지하고 DB 폴더를 원래 위치로 되돌린 후 서버를 다시 시작할 수 있습니다.모든 것이 다시 좋아질 것이다.

복구 데이터베이스 구조(http://zadpen.com/20-restore-lost-data-in-mysql-using-innodb-engine-without-file-ibdata1.html)를 사용한 후 archive.mysql 파일을 삭제하고 mysql을 시작합니다.그런 다음 데이터베이스에 보관 테이블을 작성합니다.

파손된 테이블에 문제가 있는 경우, 이것은 문제의 해결 방법일 수 있습니다.내 경우 데이터베이스 백업이 있기 때문에 파일 .ibd를 삭제하고 MAMP PRO를 재시작하면 mysql이 올바르게 시작됩니다.데이터베이스 백업을 고려해야 합니다.누군가에게 도움이 되고 많은 시간을 낭비하지 않기를 바랍니다.안부 전해요

4시간 후에 데이터 손실 없이 해결되었습니다.아래를 사용하여 문제를 해결해 주세요.

저도 같은 문제가 있었어요.나는 다른 사람들이 제안한 모든 해결책을 시도해 보았지만, 안타깝게도 아무 것도 효과가 없었다.

구글에서 솔루션을 찾는 데 몇 시간을 소비한 후 마침내 이것을 발견했다.

my.ini(linux centos /etc/my.cnf.d/server.cnf의 my.cnf)를 엽니다.[ mysqld ]를 찾습니다.

[mysqld] 바로 아래에 innodb_force_recovery 삽입 = 1

MySQL 서비스 시작

MySQL 서비스 중지

my.ini에서 행을 제거합니다(innodb_force_recovery = 1)

MySQL 서비스 시작

내 경우엔 완벽하게 작동했어

이것으로 당신의 문제가 해결되기를 바랍니다.

언급URL : https://stackoverflow.com/questions/33829888/innodb-attempted-to-open-a-previously-opened-tablespace

반응형