Connecting Supabase to Astrato
Connecting via IPV4 direct connection (recommended)
Click on ๐Connect, which appears at the very top of Supabase Studio's UI.
โโSelect Direct connetion as the method, choose the IPV4 option.
Connecting Via the Session Pooler (for free projects)
To connect Astrato to Supabase, first, find the Session pooler connection string to Astrato
To find the session pooler string:
Click on ๐Connect, which appears at the very top of Supabase Studio's UI.
โโ
Select Session pooler as the method.
โ
The full session pooler looks like this:postgresql://postgres.abcdefghijklmnop:[YOUR-PASSWORD]@aws-1-eu-west-2.pooler.supabase.com:5432/postgres
Astrato requires only some parts of the session pooler URL, examples are below:Username:
user.accountHost:
aws-0-eu-west-0.pooler.supabase.comPort:
5432
๐งโ๐ป Code to create a new user in Supabase for Astrato
๐งโ๐ป Code to create a new user in Supabase for Astrato
create user astrato with password '--ENTER YOUR PASSWORD--';
GRANT CONNECT ON DATABASE postgres TO astrato;
-- 3. Grant usage on the 'public' schema (where your tables usually live)
GRANT USAGE ON SCHEMA public TO astrato;
-- 4. Grant access to all EXISTING tables in the public schema
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO astrato;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO astrato;
-- 5. (Optional) Grant access to all FUTURE tables automatically
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO astrato;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO astrato;
alter default privileges in schema public
grant select, insert, update, delete on tables to astrato;
ALTER ROLE astrato LOGIN;
โน๏ธ We recommend not to use the default account to connect to tools. Consider creating a new db user, for use with Astrato.




