1 ### SASL Errors
2
3 When installing or running Medusa, you may get errors while Medusa tries to connect to your PostgreSQL database.
4
5 For example, you may get one of the following errors:
6
7 ```bash
8 Error: connect ECONNREFUSED ::1:5432
9 Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
10 ```
11
12 #### Error During Installation
13
14 If the connectivity error occurs while running `create-medusa-app`, it means you passed incorrect database credentials when prompted during the installation. Make sure that:
15
16 1. PostgreSQL is installed and running on your machine;
17 2. Your PostgreSQL server is configured at `localhost:5432` (the default host and port); If not, you can pass the `--db-url <url>` flag to the `create-medusa-app` command to specify a custom database URL;
18 3. You're passing correct username and password for your PostgreSQL database;
19 4. You're using a user that has privileges to create new databases;
20 5. You're passing correct database name for your PostgreSQL user. It should have the same name as your PostgreSQL user by default.
21
22 #### Error During Development
23
24 If the error occurs while running integration tests, make sure that:
25
26 1. The `DATABASE_URL` environment variable is set correctly in your `.env` file;
27 2. The [projectConfig.databaseUrl](!docs!/learn/configurations/medusa-config#databaseurl) field in your `medusa-config.js` file is set to the `DATABASE_URL` environment variable;
28 3. The database URL is using correct username and password, and points to a running PostgreSQL database instance.