# Como limpar o Banco de Dados no Raspberry?

{% hint style="danger" %}

#### **Pré-requisitos**

* Estar na **mesma rede local** do Raspberry Pi.
* Conhecer o **endereço IP** do dispositivo (ex.: `192.168.15.115`).
* Usuário **root** e senha **123web** de acesso ao phpMyAdmin.
* Ter certeza de que **já existe um backup** recente do banco (veja o guia “Backup Rasp”).
  {% endhint %}

### Passo a Passo para limpar o banco de dados do Raspberry <a href="#passoapasso" id="passoapasso"></a>

{% stepper %}
{% step %}

#### Acessar o phpMyAdmin <a href="#undefined" id="undefined"></a>

* Abra o navegador (PC, celular ou tablet).
* Digite no campo de endereço:

`http://<IP_DO_RASP>/phpmyadmin` RASP

Ex.: `http://192.168.15.115/phpmyadmin`

* Informe **Login: root** e **Senha: 123web**.

Em acesso remoto por tablet/celular, digite a senha usando o teclado virtual.

<figure><img src="https://1320237751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLaIVEmahy7qwD0rmQzED%2Fuploads%2FnptDYnkYPtDZ6TON7Tw1%2Fimage_rasp3.avif?alt=media&#x26;token=bf3b62b8-226a-4c82-9db6-7947e092bb15" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Selecionar a base WALINUX <a href="#id-2selecionarabasewalinux" id="id-2selecionarabasewalinux"></a>

* No menu à esquerda, clique em **WALINUX** (último item da lista) para expandir as tabelas.

<figure><img src="https://1320237751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLaIVEmahy7qwD0rmQzED%2Fuploads%2FTGS4R6nDUfUgdwyNtkRf%2Frasp.png?alt=media&#x26;token=37ee411b-3e8f-48de-9b25-252a6e8c4374" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Executar o script de limpeza <a href="#id-3executaroscriptdelimpeza" id="id-3executaroscriptdelimpeza"></a>

* Clique na aba **SQL** (barra superior).
* Será exibido um campo em branco.
* Copie e cole o script a seguir no editor SQL:

`DELETE FROM formapagto;`\
`DELETE FROM ultimas_vendas;`\
`DELETE FROM movimento;`\
`DELETE FROM produto;`\
`DELETE FROM venda;`\
`DELETE FROM venda_formapagto;`\
`DELETE FROM venda_impressao;`\
`DELETE FROM venda_lock;`\
`DELETE FROM venda_modificador;`\
`DELETE FROM venda_produto;`\
`DELETE FROM venda_tef;`

* Clique em **Executar**.

O phpMyAdmin exibirá a mensagem de sucesso para cada tabela.

<figure><img src="https://1320237751-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLaIVEmahy7qwD0rmQzED%2Fuploads%2FEJ444UbaIlhNhbCCFo8P%2Fimage_rasp4.avif?alt=media&#x26;token=2fcf5a70-7219-4b7f-92c2-96f7a40e2071" alt=""><figcaption></figcaption></figure>

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ajuda.pdvlegal.com.br/equipamentos/raspberry-o-que-preciso-saber/como-limpar-o-banco-de-dados-no-raspberry.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
