Skip to content

Commit

Permalink
[EDU-5659] Install EdgeSQL Shell guide (#1372)
Browse files Browse the repository at this point in the history
* feat: add install sql shell guide

* feat: translate install sql shell guide to pt-br

* Update src/content/docs/en/pages/store-journey/sql/install-edgesql-shell.mdx

---------

Co-authored-by: isidrohernandezazion <isidro.hernandez@azion.com>
  • Loading branch information
guiafonso-ol and isidrohernandezazion authored Nov 21, 2024
1 parent 08abd5e commit 933230c
Show file tree
Hide file tree
Showing 2 changed files with 144 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: How to install EdgeSQL Shell
description: >-
Learn how to install EdgeSQL Shell to interact with your Edge SQL database.
permalink: /documentation/products/store/sql/install-edge-sql-shell/
meta_tags: >-
Edge SQL, SQL, database, CRUD, API, shell, CLI
namespace: docs_store_journey_sql_install_edge_sql_shell
menu_namespace: storeMenu
---

import LinkButton from 'azion-webkit/linkbutton'

EdgeSQL Shell is a command-line interface (CLI) tool for interacting with Azion Edge SQL, allowing users to manage databases, execute SQL commands, and perform various database operations.

This guide will show you how to install EdgeSQL Shell and start taking advantage of its features to easily manage your databases.

## Requirements

In order to install EdgeSQL Shell you must have the following dependencies installed:

- Python 3.x
- [Psycopg2](https://pypi.org/project/psycopg2/)
- [MySQL Connector/Python](https://pypi.org/project/mysql-connector-python/)

You'll also need an Azion [personal token](/en/documentation/products/guides/personal-tokens/).

## Installing EdgeSQL Shell

1. Clone the EdgeSQL Shell git repository:

```sh
git clone https://github.com/aziontech/edgesql-shell.git
```

2. Enter the directory:

```sh
cd edgesql-shell
```

3. Install the Python dependencies:

```sh
python -m venv env
source env/bin/activate
brew install postgresql
pip install -r requirements.txt
```

4. Install the required system dependencies:

```sh
pip install mysql-connector-python
pip install psycopg2
```

5. Set your **personal token** as an environment variable:

```sh
export AZION_TOKEN="<your_auth_token_here>"
```

6. Execute the following command to run the EdgeSQL Shell:

```sh
python edgesql-shell.py
```

Now you can use the EdgeSQL Shell commands, set environment variables and run SQL queries directly in the terminal.

<LinkButton link="/en/documentation/products/store/sql/edge-sql-shell-commands/" label="Go to EdgeSQL Shell commands reference" severity="secondary" />
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: Como instalar o EdgeSQL Shell
description: >-
Aprenda a instalar o EdgeSQL Shell para interagir com seu banco de dados Edge SQL.
permalink: /documentation/products/store/sql/install-edge-sql-shell/
meta_tags: >-
Edge SQL, SQL, database, CRUD, API, shell, CLI
namespace: docs_store_journey_sql_install_edge_sql_shell
menu_namespace: storeMenu
---

import LinkButton from 'azion-webkit/linkbutton'

O EdgeSQL Shell é uma ferramenta de interface de linha de comando (CLI) para interagir com o Azion Edge SQL, permitindo que os usuários gerenciem bancos de dados, executem comandos SQL e realizem várias operações de banco de dados.

Este guia mostrará como instalar o EdgeSQL Shell e começar a aproveitar seus recursos para gerenciar seus bancos de dados com facilidade.

## Requisitos

Para instalar o EdgeSQL Shell, você deve ter as seguintes dependências instaladas:

- Python 3.x
- [Psycopg2](https://pypi.org/project/psycopg2/)
- [MySQL Connector/Python](https://pypi.org/project/mysql-connector-python/)

Você também precisará de um [token pessoal](/pt-br/documentacao/produtos/guias/personal-tokens/) da Azion.

## Instalando o EdgeSQL Shell

1. Clone o repositório git do EdgeSQL Shell:

```sh
git clone https://github.com/aziontech/edgesql-shell.git
```

2. Entre no diretório:

```sh
cd edgesql-shell
```

3. Instale as dependências do Python:

```sh
python -m venv env
source env/bin/activate
brew install postgresql
pip install -r requirements.txt
```

4. Instale as dependências de sistema necessárias:

```sh
pip install mysql-connector-python
pip install psycopg2
```

5. Defina seu **personal token** como uma variável de ambiente:

```sh
export AZION_TOKEN="<your_auth_token_here>"
```

6. Execute o seguinte comando para rodar o EdgeSQL Shell:

```sh
python edgesql-shell.py
```

Agora você pode usar os comandos do EdgeSQL Shell, definir variáveis de ambiente e executar consultas SQL diretamente no terminal.

<LinkButton link="/pt-br/documentacao/produtos/store/sql/edge-sql-shell-commands/" label="Consulte a referência de comandos do EdgeSQL Shell" severity="secondary" />

0 comments on commit 933230c

Please sign in to comment.