START SLAVE

Stai visualizzando una vecchia versione di questo article. Visualizza la versione più recente.
START SLAVE [tipo_thread [, tipo_thread] ... ]
START SLAVE [SQL_THREAD] UNTIL                
    MASTER_LOG_FILE = 'nome_log', MASTER_LOG_POS = pos_log
START SLAVE [SQL_THREAD] UNTIL
    RELAY_LOG_FILE = 'nome_log', RELAY_LOG_POS = pos_log

tipo_thread: IO_THREAD | SQL_THREAD

START SLAVE, se usato senza le opzioni tipo_thread, avvia entrambi i thread slave. Il thread I/O legge gli eventi dal master e li scrive nel relay log. Il thread SQL legge gli eventi dal relay log e li esegue. Per eseguire START SLAVE, è necessario disporre del privilegio SUPER.

Se START SLAVE riesce ad avviare i thread slave, termina senza errori. Tuttavia, anche in questo caso, potrebbe accadere che i thread slave si avviino e successivamente si arrestino (per esempio perché non riescono a connettersi al master, o a leggere il log binario, o per qualche altro problema). START SLAVE non avverte di questo problema. Occorre quindi controllare il log degli errori, cercando messaggi generati dai thread slave, o controllare che questi ultimi siano attivi tramite SHOW SLAVE STATUS.

Per arrestare lo slave si usa STOP SLAVE.

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.