# Connect with psql and mysql

> Commands to open psql or mysql against a SQLEye instance and to create a database, using 127.0.0.1, the instance port and no password.

Source: https://sqleye.com/docs/connect/cli-clients/ · Last updated: 2026-11-29 · Publisher: CodeROG (https://coderog.com)

The Info tab of each instance shows the exact `psql` or `mysql` command. They have this shape.

## How do I use psql?

```bash
psql -h 127.0.0.1 -p 5432 -U postgres postgres
```

Create a database for your app:

```bash
createdb -h 127.0.0.1 -p 5432 -U postgres myapp
```

## How do I use mysql?

```bash
mysql -h 127.0.0.1 -P 3306 -u root
```

Create a database:

```bash
mysql -h 127.0.0.1 -P 3306 -u root -e "CREATE DATABASE myapp"
```

Replace the port with your instance's port. Use `-h 127.0.0.1`: there is no Unix socket, and `localhost` may make `mysql` look for one.

## Can I copy the string from the app?

Yes. Right-click the instance in the sidebar and choose **Copy connection string**.

If the connection is refused, check the instance is running and the port matches, see [ports](/docs/instances/ports/).
