MySQL의 performance_schema 데이터베이스를 삭제했는데 어떻게 만들 수 있습니까?


10

ibdata / log 문제를 해결하는 동안 실수로 performance_schema데이터베이스를 삭제했습니다 . 새 데이터베이스를 만들고 싶습니다.

mysql> SHOW VARIABLES LIKE 'perf%';
+---------------------------------------------------+---------+
| Variable_name                                     | Value   |
+---------------------------------------------------+---------+
| performance_schema                                | ON      |
| performance_schema_events_waits_history_long_size | 10000   |
| performance_schema_events_waits_history_size      | 10      |
| performance_schema_max_cond_classes               | 80      |
| performance_schema_max_cond_instances             | 1000    |
| performance_schema_max_file_classes               | 50      |
| performance_schema_max_file_handles               | 32768   |
| performance_schema_max_file_instances             | 10000   |
| performance_schema_max_mutex_classes              | 200     |
| performance_schema_max_mutex_instances            | 1000000 |
| performance_schema_max_rwlock_classes             | 30      |
| performance_schema_max_rwlock_instances           | 1000000 |
| performance_schema_max_table_handles              | 100000  |
| performance_schema_max_table_instances            | 50000   |
| performance_schema_max_thread_classes             | 50      |
| performance_schema_max_thread_instances           | 1000    |
+---------------------------------------------------+---------+
16 rows in set (0.06 sec)

그 변수는 나에게 괜찮은 것 같습니다.

다음 질문은 똑같은 질문이지만 사용자는 그러한 지침을 찾을 수없는 설명서를 따르면서 만들 수 있다고 결론을 내립니다.

mysql : performance_schema를 삭제했습니다. 문제입니까?

이견있는 사람?

답변:



-1

DROP DATABASE가 복구 가능하다는 것을 암시하지만 이상한 조건에서만 http://dev.mysql.com/doc/refman/5.0/en/binary-log.html에 익숙하지 않습니다.

Docs에 따르면, binlogs는 주어진 기준점에 따라 실행되는 일련의 명령 일뿐입니다. 따라서 "DROP DATABASE"를 수행했을 때 "아, 데이터베이스를 삭제하는 대신에 지금 백업해야합니다"는 마지막 binlog에 "DROP DATABASE"를 작성했을뿐입니다. 테이프를 거꾸로 재생하는 것만 큼 간단하지는 않습니다.

수행 할 작업은 마지막으로 성공한 데이터베이스에서 데이터베이스를 복구하고 해당 복구 지점과 DROP 명령 사이에서 발생한 binlog를 적용하는 것입니다.

http://dev.mysql.com/doc/refman/5.0/en/recovery-from-backups.html

어느 바이너리를 사용할지를 결정하는 방법이 명확하지 않습니다.

전체 파일 시스템 백업보다 나은 것은 없습니다. 그리고 당신은 적어도 이것으로 되돌아 가야합니다.


1
나는 거기에 있던 데이터를 복구하는 데 관심이 없으며 성능 메트릭을 다시 수집 / 저장할 수 있다는 것입니다. Craig Efrein의 솔루션은 이러한 목적으로 작동했습니다.
주니퍼 X

-1. 성능 스키마 데이터는 복제되지 않으며 binlog에 복구 할 항목이 없습니다 (물론 5.0에는 존재하지 않음).
Marc Alff
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.