Skip to content

Connect with psql and mysql

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

Terminal window
psql -h 127.0.0.1 -p 5432 -U postgres postgres

Create a database for your app:

Terminal window
createdb -h 127.0.0.1 -p 5432 -U postgres myapp
Terminal window
mysql -h 127.0.0.1 -P 3306 -u root

Create a database:

Terminal window
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.

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.

SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.