Mysql
 sql >> Database >  >> RDS >> Mysql

Le tabelle che creo che iniziano con dotNetChat_ scompaiono dopo aver riavviato MySQL

Direi che per qualche motivo a MySQL viene negato l'accesso ai file InnoDB, che quindi non può caricare e continua senza di essi. Puoi verificare che il tuo processo non venga eseguito due volte e che l'utente MySQL sia eseguito con un account che ha accesso alla directory MySQL lib.

Baso i miei risultati su questo errore:

[ERROR] InnoDB: Failed to find tablespace for table "thepwf_prgminteractions"."dotnetchat_testtable" in the cache. Attempting to load the tablespace with space id 24.
2014-03-05 18:05:33 0x1f30  InnoDB: Operating system error number 32 in a file operation.
InnoDB: The error means that another program is using InnoDB's files.
InnoDB: This might be a backup or antivirus software or another instance
InnoDB: of MySQL. Please close it to get rid of this error.

Ed errore 32, basato su http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx significa:

ERROR_SHARING_VIOLATION
32 (0x20)
The process cannot access the file because it is being used by another process.

Il che significa, come ho detto, che i file vengono bloccati da un altro processo. E succede quando riavvii MySQL perché quando li crei, MySQL li ha aperti e un altro processo non può bloccarli. Non appena il servizio MySQL viene arrestato (per il riavvio), un altro processo blocca i file e MySQL non può aprirli al riavvio.

Per vedere i file bloccati sul tuo sistema e quale processo lo tiene bloccato puoi usare http://technet.microsoft.com/en-us/sysinternals/bb896655.aspx

Dovresti eseguire CMD Prompt come amministratore e digitare qualcosa come:

handle.exe thepwf_

Che dovrebbe mostrare quale processo tiene i file bloccati.

Fammi sapere cosa trovi.