# Username and Password

{% stepper %}
{% step %}
**Create the IAM Database User**

**MySQL or MariaDB or Oracle**

```sql
CREATE USER teleskope_ro IDENTIFIED BY '****PASSWORD****'
```

**MS SQL**

```sql
CREATE LOGIN teleskope_ro WITH PASSWORD = '****PASSWORD****';
```

**Postgres**

```sql
CREATE USER teleskope_ro WITH PASSWORD  '****PASSWORD****'
```

{% endstep %}

{% step %}
**Grant DB User Permissions**

{% tabs %}
{% tab title="Read Access" %}
**MySQL or MariaDB**

```sql
GRANT SHOW DATABASES, SELECT ON *.* TO teleskope
```

**Postgres versions 14+**

```sql
GRANT pg_read_all_data TO teleskope
```

**Postgres versions < 14**

```sql
SELECT format('GRANT CONNECT ON DATABASE %I TO teleskope;', datname) FROM pg_database \gexec
SELECT format('GRANT USAGE ON SCHEMA %I TO teleskope;', nspname) FROM pg_namespace \gexec
SELECT format('GRANT SELECT ON ALL TABLES IN SCHEMA %I TO teleskope;', nspname) FROM pg_namespace \gexec
```

**Oracle SQL**

```sql
CREATE USER teleskope IDENTIFIED BY "StrongPassword";
GRANT CONNECT TO teleskope_ro;
GRANT SELECT ANY TABLE TO teleskope_ro;
GRANT SELECT_CATALOG_ROLE TO teleskope_ro;
```

**MS SQL**

```sql
GRANT VIEW ANY DATABASE TO teleskope;
DECLARE @sql NVARCHAR(MAX);
SET @sql = '';
SELECT @sql += 
    'USE [' + name + ']; 
    CREATE USER teleskope FOR LOGIN teleskope;
    GRANT SELECT TO teleskope;
    GRANT VIEW DATABASE STATE TO teleskope;' + CHAR(13)
FROM sys.databases
WHERE state = 0 AND name NOT IN ('tempdb', 'model', 'msdb', 'rdsadmin');
EXEC sp_executesql @sql;
```

{% endtab %}

{% tab title="Write Access" %}
**MySQL or MariaDB**

```sql
GRANT UPDATE, DELETE on *.* TO teleskope
```

**Postgres versions 14+**

```sql
GRANT pg_write_all_data TO teleskope
```

**Postgres versions < 14**

```sql
SELECT format('GRANT UPDATE, DELETE ON ALL TABLES IN SCHEMA %I TO teleskope;', nspname) FROM pg_namespace \gexec
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
**Submit the&#x20;**<mark style="color:purple;">**Username and Password**</mark>**&#x20;in the Teleskope interface**
{% 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://docs.teleskope.ai/connectors/aws/rds/username-and-password.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.
