Running your project
Databases: PostgreSQL, more than one per website, and the work around them
What this page is for: give a website a PostgreSQL database beside MariaDB, give one website more than one database, and do a database's everyday work on SixPanel's own pages — users and what each may do, the tables and their upkeep, the character set, export, import and delete. phpMyAdmin — and Adminer, for PostgreSQL and SQL Server too — are still there for looking inside a database; the work that changes who may reach what is done here, the way cPanel does it on its own Database page.
You need
- The owner's login for anything that changes a database. A temporary login can look at every page on this subject and change nothing; the read-only demo shows them too.
- For PostgreSQL: a server on Ubuntu 26.04, Ubuntu 24.04 or Debian 13 with at least 1 GB of memory. It comes from your system's own packages — PostgreSQL 18 on Ubuntu 26.04, 16 on Ubuntu 24.04, 17 on Debian 13 — and is kept up to date by its security updates.
What does not change: a website's first MariaDB database stays exactly where it was, with the same name, the same user, the same password and the same variables. Nothing is moved or rewritten when you update SixPanel. A 6amMart shop keeps its one database — it is made for the shop and fixed — so it gets the safe tools (below) and nothing that adds or removes a database.
PostgreSQL
Install it
Open Server, the Software tab, and press Install on the PostgreSQL card. The card says first what it needs (memory, disk, the systems it runs on) and, on a server where it cannot run, why. The install is a job you can follow from the top bar; it takes a minute or two.
What SixPanel sets up, and keeps that way:
- It answers on this server only —
127.0.0.1and its socket, never a public address. The access rules (pg_hba.conf) start with a block SixPanel writes: the server's ownrootreaches the administrator over the socket, every database user signs in with a password, and any other address is refused. The block is written again at every panel start. - Passwords are
scram-sha-256, and the panel hands PostgreSQL only the stored form of each one, never the password itself. - Sized for this server: its memory buffers, connections and per-query memory follow the server's memory and cores, the way MariaDB's are, and it has a memory ceiling of its own so a busy database cannot take the whole server. It is started again by itself if it ever stops.
- MariaDB and PostgreSQL share one memory budget. The memory budget a server sets aside for its databases is the same with one database or two, so the PHP workers, Redis, your apps and Docker keep what they had. (What MariaDB actually takes inside that budget is sized by its data — see Database server — so on a server with MariaDB alone it can be less than the budget.) With PostgreSQL on the server, that budget is shared by how much data each one holds. When there is room for twice the data of each, each gets exactly that and the rest of the budget stays free for the server (builds, websites). When there is not, the budget is divided by how much each holds, and the one with more data gets more — never more than twice its own data, and a database whose data grows never gets less memory for it. PostgreSQL keeps half of its share as its own buffers and leaves the other half to the system's file cache, which it reads through as well. The panel weighs both databases when it starts, every six hours, and at every update. MariaDB moves to its new share at the next update, or at once with Apply on the server's tuning. A value you set yourself on Server → Database is never changed. PostgreSQL also gets ten connections for each website that keeps a database in it.
- Nobody but a database's own users may open it. PostgreSQL normally lets every account connect to every database; SixPanel takes that away for each database it makes.
If PostgreSQL was already on the server before SixPanel, the panel looks after the same settings, and removing it from Software later leaves its packages in place.
Look after it
Manage on its Software card (or Server → Database, where it has a card beside MariaDB) shows whether it is running, where it answers, how it was sized, how many connections are in use, settings that wait for a restart, and every database in it with the website that keeps it. Restart writes SixPanel's settings again and restarts it — the websites that use it lose their connections for a few seconds.
Health has a PostgreSQL row: red when a website keeps a database there and PostgreSQL is stopped or gone, or when it answers on a public address; amber when its access rules no longer start with SixPanel's block, or when a setting other than its memory waits for a restart. A new memory size that waits (an update sizes it by its data) is information: the size it runs, the size it gets, how much a restart gives back, and a Restart button. It turns amber only while the server is short of memory or a build was stopped for memory, or, for a larger size, while the server waits on its disk.
Remove it
Remove on its Software card. It is refused while a website still keeps a database there — delete those on each website's Database page first. Its data stays on the disk unless you choose to delete it in the same dialog, so installing it again finds every database as it was.
More than one database for a website
Open the website, then Database. The Databases card lists every database the website has — the first one marked first — with its engine, size and number of users.
A website is made with MariaDB or with no database. For a first database of another engine — PostgreSQL, MongoDB or SQL Server — make the website with No database, then add it here: Add a database makes it the website's first, under the first database's name.
Add a database asks two things:
- Engine — the ones this server has. One that is not installed says so, with the way to Software; one that cannot run here says why.
- Name — a short name, lowercase letters and digits. The database and its own user are called
site_<the website's short id>_<name>, at most 32 characters (the dialog says how many are left). A website's first database needs no name: it issite_<short id>, whatever its engine.
One name is one thing on the whole server: a name another website or a shop already uses, or a database or account the engine already has that no website here owns, is refused — somebody else's data never becomes this website's because a name matched.
Node.js apps, PHP websites, WordPress and Create with AI websites can have up to eleven databases. A static website has none; a staging site has the databases of the website it is a copy of.
How the app reaches them
- The first database gives the app today's variables:
DATABASE_URL,DB_CONNECTION,DB_HOST,DB_PORT,DB_DATABASE,DB_USERNAME,DB_PASSWORD. A Node.js app gets them in its environment by itself (restart it after a change); a PHP website writes them into its.envwith Write these into the app's .env. That is true when the first database is PostgreSQL too —DB_CONNECTIONis thenpgsql, which is what Laravel reads. - Every other database has names of its own, made from its name: a database called
site_shop_reportsisREPORTS_DATABASE_URL,REPORTS_DB_HOSTand so on. They are never put into the app by themselves — open the database (Manage) and press Add to the app's environment (Node.js) or Write into the app's .env (PHP). - A PHP website given a PostgreSQL database also gets PHP's
pgsqlextension for its PHP version, when that version does not have it yet.
PostgreSQL is reached over 127.0.0.1 on its port (5432 unless the server set another); MariaDB over its socket (localhost) from PHP and 127.0.0.1 from Node.js.
A database's tools
Manage on a database's row opens its tools under the list.
Connection — its host, port, name and user, its address without the password, and the variables the app reads it by. Show password shows its password; only the owner can, and not many times a minute. (The first MariaDB database's password, and Change password, stay on its own card above, because changing it also changes wp-config.php and the .env.)
Users
Every database has its own user, which the app signs in with. Add user gives it another, with a password the panel makes and keeps:
- Read-only — on MariaDB,
SELECTandSHOW VIEWon that one database; on PostgreSQL, connecting and reading every table there is now and every table made later. For a reporting tool, a dashboard or a person who should look and not touch. - All privileges — everything the database's own user may do there, and nothing outside it.
Make read-only / Give all privileges changes one, Show password and New password work as for the database itself, and Remove deletes the user — the database and its data stay. A new password for the database's own user follows into the app's settings where the panel wrote them (its environment, or a .env that names this database); anything else using the old one needs the new one.
Tables
Every table with its rows and size (the number of rows is an estimate for InnoDB tables). Tick tables — or none, for every table — and choose:
| MariaDB | PostgreSQL | |
|---|---|---|
| Check | reads each table through and reports what it finds; changes nothing | — |
| Repair | mends a MyISAM or Aria table; InnoDB tables look after themselves and are skipped | — |
| Optimize | rebuilds each table to give back the space deleted rows left — a large table takes a while and the app waits on it, so pick a quiet moment | — |
| Analyze | refreshes the statistics the database plans its queries with | the same |
| Vacuum | — | makes the space dead rows hold reusable and refreshes the statistics; the tables stay in use |
| Reindex | — | rebuilds each index beside the old one, without locking the table |
Each is a job, a table at a time, with every table's result in its log. A full rewrite under a lock (VACUUM FULL) is never offered.
Character set
MariaDB only. The database's character set and collation now, and Change: tables made from then on use it. Also convert every table rewrites each table in the new one — export the database first, and give a large database time. A PostgreSQL database here is UTF-8, which holds every language, and is not changed afterwards.
Export and import
Export now writes a file of the whole database onto the server — .sql.gz for MariaDB, a .dump (PostgreSQL's own compressed format) for PostgreSQL — and keeps the newest five, with a Download each.
Import a file loads a file into the database. Before it runs, the database as it is now is kept on the server (the newest two such copies stay); with no room on the disk for that copy the import is refused and nothing changes. The file is read as the database's own user, so it can change that database and nothing else. The program that reads a MariaDB file runs as an account of SixPanel's own that owns nothing (never the server's administrator), and its own commands stay off: a LOAD DATA LOCAL INFILE line in the file is refused, and a system line runs nowhere it could do harm. On a server whose MariaDB client is too old to switch those commands off and which has no such account, the import is refused — update the server's packages, then try again. MariaDB takes .sql and .sql.gz; PostgreSQL also takes a .dump made by pg_dump -Fc. A .dump imported into a PostgreSQL database that already has its tables replaces them, partitioned tables included: it is loaded into a new database beside the live one, made the same way (its owner, its sixpanel.json setup, its other users), and only when the whole dump has loaded are the two swapped — so a dump that stops part-way leaves the live database exactly as it was, and tables the app made that the dump does not have never stand in its way. Every table, key, index, foreign key, policy and trigger comes back as the dump has them, with the privileges the dump gives and no more. What is set on the database itself — its ALTER DATABASE … SET settings, a user's settings in it, who may connect to it, its comment — is kept through the swap. The new database takes what the dump loads to, not what the old one held: a compressed dump (pg_dump -Fc) grows several times over as its rows load and its indexes are built again, so the panel counts four times the file (the file's own size for an uncompressed one), or the old database's size when that is larger. When the disk that holds PostgreSQL's data has not that much and a quarter free, the import is refused before anything starts and says how many MB it needs and how many are free. If the server or the panel stops while a dump loads, the half-loaded copy is deleted when the panel starts again (or at the next import) — it never stays on the disk. A plain .sql or .sql.gz is different: PostgreSQL runs it where it is, one statement after another, and what ran before an error stays. When one stops part-way, the job says where (the line of the file) and what that left — nothing of the file stayed (it stopped before any change, or inside a transaction the file opened, which is undone), the database is partly imported, or the panel cannot tell — and, unless nothing stayed, the copy kept before the import, which is a pg_dump file: imported into the database, it puts its tables and rows back as they were. A plain file is never run as one transaction, because a file with CREATE INDEX CONCURRENTLY or VACUUM in it would then be refused.
The settings a .dump carries for its own database (ALTER DATABASE … SET search_path, statement_timeout, TimeZone and the like) are applied too, after the data has loaded. When the dump and this server both name the same setting, this server's value wins: first what sixpanel.json sets for the database, then what was set on the database before the import. The dump only fills in settings neither of those names. The rule is the same when a backup is put back, where the database is deleted and made again first: what was set on it, who may connect to it and its comment are read before it is deleted and given back once the dump has loaded. The dump's own comment on its database (COMMENT ON DATABASE) follows the same rule: it is kept when the database has no comment of its own, and this server's comment wins when it has one. The settings are applied as the website's own user, so a setting only PostgreSQL's superuser may change (log_min_duration_statement, for example) is refused, and so is a setting the dump makes for one particular user in the database. A custom setting such as Supabase's app.settings.jwt_secret is refused too: PostgreSQL lets only its superuser store one on a database or a user (the website's own user cannot, not even on itself), and the panel never stores one as the superuser. The app sets it on each connection instead, with ?options=-c%20app.settings.jwt_secret%3D<value> on its connection address or a SET app.settings.jwt_secret = '<value>' when it connects; the log names each such setting. The import's log lists what was applied, what was kept because this server already sets it, and what was refused and why.
A dump that makes pgjwt, hypopg, plpgsql_check, pg_repack or wrappers keeps it: the app's own functions may call it (older Supabase apps sign tokens with pgjwt). When the server has that extension's PostgreSQL package it is made before the dump loads. When it has not, and nothing in the dump calls it (many older Supabase projects have pgjwt turned on and never use it), it is left out and the job's log says so. Only when the dump's own functions call it is the import refused before anything loads, and the message says what to do: for hypopg, plpgsql_check and pg_repack the package to install (postgresql-<version>-hypopg, -plpgsql-check, -repack, from the server's own distribution); pgjwt and wrappers have no package in Ubuntu's or Debian's archive, so export the database without them and without the functions that call them.
Moving a database from Supabase
There is no separate wizard: the normal Import a file takes a Supabase project's dump as it is.
- Make the dump with PostgreSQL's own tool, in its compressed format, from the project's connection string (Supabase → Connect → Session pooler or Direct connection):
pg_dump -Fc --no-owner -d "<connection string>" -f project.dump. - On the website, add a PostgreSQL database (or let its
sixpanel.jsonmake it, with"apiRoles": "supabase"when the app usesanon,authenticatedandservice_role). - Import a file on that database and choose
project.dump.
What is Supabase's own and never a website's — pg_stat_statements, supabase_vault, pg_cron, pg_net, pg_graphql, pgsodium and the schemas vault, graphql, realtime, cron, net, pgbouncer… — is left out, and the job's log names it in one line. Your tables, their rows, the auth and storage schemas your policies read, and every grant and row-level security policy come back. An extension your own functions call (pgjwt, say) is kept, as above. When the server cannot make it, a dump that never calls it still imports; one that does is refused, with the reason.
A MariaDB database: add to what is there, or replace it — the same choice the first database has. An import runs the file over the database as it is. Tick Replace the whole database with this file to have every table removed first, so the database holds only what the file makes — the right choice for a file with no DROP TABLE lines (phpMyAdmin's default export), which, imported over tables that are already there, stops at the first one with Table … already exists. Replace asks its own question, and the copy is still kept first; the database's users keep their access. When a file stops part-way, the job says what that left: nothing of the file ran, the database is partly imported (a change had run before the error and stayed), or the panel cannot tell how much ran (a file inside a transaction, undone when it stops, is one) — and, unless nothing ran, it names the copy it kept. The database server's own lines are in the job's log, whole. Under the import, Copies kept before an import lists those copies (the newest two), each with Put back: one press makes the database exactly as it was in that copy, and what is in it at that moment is kept first too, so a Put back can itself be undone the same way. If MariaDB refuses to empty the database for a Replace, no line of the file runs, and the job says that instead. A database another website, a 6amMart project or a staging site also names is never emptied for this one: Replace and Put back are refused before any copy is taken, naming who else uses it (with Replace ticked, as soon as you choose the file — before it is uploaded and before the question).
The file goes up first, then the question names the database it goes into and how many tables and rows it holds now — and, for a PostgreSQL dump (.dump), how many tables and rows the file itself holds (counted from the file, nothing loaded; a very large dump that takes longer than twenty seconds to count is not counted). When a PostgreSQL dump was made from a database of another name or owner — another website's database on this server above all — the question says so in bold and asks you to type the database's name. (The first MariaDB database keeps its own Export & import card.)
Delete this database
Type the database's name to confirm. The database, its users and its exports are deleted, and the panel cannot bring it back by itself — export it first if you may need it. Deleting the first database takes DATABASE_URL and DB_* away from the app. WordPress's own database is never deleted on its own: delete the website instead.
When the database server refuses to remove something, the delete still runs every other step, and then ends as failed with its last step, Check that nothing was left on the server, naming what is still there. That is either the database itself or, when only they are left, its users — its own user or one you added, on every engine, the first MariaDB database's too. The panel tries again each time it starts, and before it gives that name to a new database. When the database's engine has been removed from Software, nothing of it is left on the server to delete: the delete says so and ends ok. If that engine is installed again with its data kept, the database is deleted the next time the panel starts. Its name is free meanwhile: a new database may be given it in another engine. A user that was left goes before a new database is given its database's name, so it can never reach the new one. Deleting a website ends the same way when one of its databases or users is left.
A 6amMart shop's database
The shop's Database page has a Tables section (open it to load it): every table with its rows and size, the character set the shop was installed with, and Check, Analyze, Optimize and Repair for the tables you tick. Database care, above it, already does the regular clean-up by itself; these are for when you want one now.
Nothing on that page makes or drops a database, adds a user or changes the character set: the shop has one database, made for it, and its own updates expect it as it is.
phpMyAdmin, kept small
phpMyAdmin is for looking inside a database and running a query. What changes who may reach what is on SixPanel's pages, so phpMyAdmin no longer offers it:
- no Create database and no Drop database (a typed
DROP DATABASEis refused too), no Change password — a database's password is changed on its card, which also changes the app's settings — and no server information; - the server's own system databases are not listed;
- Open in phpMyAdmin on a Database page signs in as that database's own user and shows that one database and nothing else;
- nobody signs in as
root, and a database's user has no right to make users.
Signing in at phpMyAdmin's own login form (for another tool's user, say) still works as before.
Adminer
phpMyAdmin is MariaDB's. Adminer is a second database browser that opens the three databases SixPanel runs — MariaDB, PostgreSQL and SQL Server — the way phpMyAdmin opens MariaDB. MariaDB can be looked at in either one; the two do the same work there. It is off until you install it, and off again when you turn it off: it costs nothing while it is off.
Install it on Software (the Databases group): press Install on Adminer. The panel downloads Adminer's own release file from the project's GitHub release page (adminer-6.2.0.php), checks it against a checksum that SixPanel carries, and installs your system's own PHP drivers for PostgreSQL and SQL Server (php-pgsql, and php-sybase for SQL Server — no other software source is added). It does not start anything. Remove on the same card takes it away again.
Turn it on on Software, or on the Adminer card on Server → Database with Turn on; Turn off switches it off again and ends every sign-in not yet used. Its card says whether it is installed, on or off, its version and, while it is on, the memory its workers use. If a database server cannot be opened yet (this system has no PHP driver for it) the card says which.
After an update of SixPanel, a phpMyAdmin or an Adminer that is on is brought up to date with the new version when the panel starts again — its settings files are written again where they changed, and Adminer chooses a new key — with nothing to press. One that is off stays off.
Open in Adminer sits beside a database on Server → Database (MariaDB), in the All databases list, on a project's and on a website's Database page (for each of its databases — MariaDB, PostgreSQL or SQL Server). It opens Adminer in a new tab already signed in as that database's own user, with no password to copy, and turns Adminer on first if it is off. Open Adminer on the card shows Adminer's own sign-in, for a database user and password you type yourself. If Adminer is not installed, the press says so and Install on Software is on the card.
What Adminer is allowed to do here
Adminer's own login form asks for any server. Here it does not: it offers only the servers SixPanel runs on this machine — MariaDB (over its socket), PostgreSQL (its cluster) and SQL Server (its container, on this server only) — and nothing else, so it cannot be used to reach anything on this server or beyond it. Its other drivers (SQLite, which writes files, and the rest) are refused. Beyond that it keeps phpMyAdmin's rules:
- nobody signs in as
root,postgresorsa: only a database's own user; - Open in Adminer shows that one database and nothing else (another database's address is refused), and refuses the pages and buttons that make, alter or drop a database or add or change users (those are on SixPanel's own Database pages) and any
DROP DATABASEin what you type, save or import. That guards against a slip, not against the user itself: a database's own user may drop its database, as any program that signs in as it could — remove a database with Remove on the Database page, which keeps a copy first; - the same limits as phpMyAdmin: a file of up to 64 MB can be imported, and a request may take up to five minutes;
- a database a move has paused, or one still being made, is not opened;
- the password goes from the panel to Adminer in a single-use ticket that works for one minute — it is in no address, page, log line or audit line — and Log out in Adminer ends the sign-in;
- only the panel reaches Adminer: a program on this server that calls it directly — a website's own code included — is refused, with a key chosen again every time Adminer is turned on;
- wrong passwords are counted per tab: thirty in one tab lock that tab for 30 minutes, never another tab or an Open in Adminer;
- Adminer runs as its own account,
six-adminer, and phpMyAdmin assix-pma— the names a 6amMart project called adminer or pma would have. No new project can take either name; on a server where an older one already has it, that browser is not installed or turned on (it would take that shop's PHP over), Software says why, and Health names the project and the way in to its databases.
An Adminer tab is not a page of the panel
Exactly as for phpMyAdmin (above), every press opens a tab of its own with a sign-in of its own, the tab works until you sign out of SixPanel and for an hour after you last used it, and nothing that runs in an Adminer tab can press a button of the panel. Turning Adminer off, or an update of SixPanel, closes every tab; after that it says This Adminer tab is closed — open Adminer again from SixPanel. A temporary login, the read-only demo and Tia (the AI assistant) cannot open Adminer: opening a database as its user is the owner's.
SQL Server in Adminer
Adminer reaches SQL Server through the system's own php-sybase package (FreeTDS) — available on Ubuntu 26.04, Ubuntu 24.04 and Debian 13 — so SQL Server needs no software source of its own. SQL Server itself is installed from Software (see MongoDB and SQL Server).
The Database manager: the data inside, for every engine
phpMyAdmin is MariaDB's. The Database manager does the same work inside the panel for every engine a website's database can be in — MariaDB, PostgreSQL, SQL Server and MongoDB — and for a 6amMart shop's database.
Open it with Manage data on the Database manager card at the end of a website's (or a project's) Database page. It opens on that database, inside the same page, with five tabs:
- Tables (MongoDB: Collections) — each one with its rows and size. Browse opens it.
- Rows (MongoDB: Documents) — a page at a time (25, 50, 100 or 250), with a Search in every column or in one, and a press on a column's name to sort by it. Add a row, Edit and Delete work on a table with a primary key: a row is named by its key, so a table without one is changed with a query. A value can be set empty (NULL), binary data is written in hexadecimal, and a value too long to show in full is changed with a query. In MongoDB a document is edited whole, in Extended JSON (
{"$oid": …},{"$date": …}), so its types stay what they were; the filter and the sort are Extended JSON too. - Structure — a table's columns (type, empty or not, default), its primary key and indexes, and a view's definition. MongoDB has no fixed columns: the fields its documents use are read from a sample of them.
- Query — any statement (MongoDB: a find with a filter, or an aggregation pipeline). At most 1,000 rows of each result are shown, and it is stopped after 30 seconds, 2 or 5 minutes (you choose). Read only runs one statement that reads, in a transaction that is thrown away, so nothing it does is kept. A statement that changes something asks first.
- Import & export — one table as CSV, JSON or SQL (MongoDB: one document a line) to download, at most 500,000 rows. An import adds rows to the chosen table from CSV (a header line of column names) or JSON, in one go: a row the database refuses stops it and nothing is kept. An SQL file runs as a script in the database. At most 64 MB and 50,000 rows — a whole database is still exported and imported on its card.
It signs in as the database's own user — the one the website's app uses — never as root, postgres, sa or MongoDB's root user. So it can reach that database and nothing else, and what it may do there is what the app may do. No password is shown on any of these pages.
Who may use it: you, everything. A reseller or user account: everything, on its own websites' databases. A temporary login may look — the tables, the rows, the structure — and its queries are always read-only; it cannot change, export or import. The demo sees the tables only, never a row. Tia sees the tables and their structure, and never a row, a query, an export or an import.
A database you made yourself on Server → Database — for something that is not a website, in any of the four engines — has the same Database manager. Manage data is on its row in All databases and on its detail under that engine's tab (Databases made here). It signs in as the user made with that database, from the password SixPanel keeps for it; when that password was lost the page says so, and New password on the database's card makes a new one. This one is the owner's alone: a temporary login, the demo and an account cannot open it, not even to look.
The engines are reached on this server only — MariaDB and PostgreSQL over their sockets, MongoDB and SQL Server on 127.0.0.1 — so nothing new is opened to the internet.
Backups, restores, staging sites and moves
- Backups take every database of every website — each in its own engine's format, and named by it:
.sql.gzfor MariaDB,.dumpfor PostgreSQL,.archive.gz(a mongodump archive) for MongoDB and.bak.gzfor SQL Server. Backups taken before SixPanel named them so called a MongoDB or SQL Server dump.sql.gz; they still restore, and the restore test still reads them. The backup's log gives each dump's size (in bytes when it is under 1 KB). A database that could not be dumped is named in the backup's result and left out of that one backup; the rest goes on. - Restoring a website's database puts back each of its databases from the backup, each as its own user, and keeps each as it is first; one that cannot be imported is put back as it was.
- A staging site is made with the website's first database only. Its files are searched for the passwords of production's other databases too, and a staging site that still holds one is not started until that file is changed (its card says which).
- Moving a website to another server carries every MariaDB and PostgreSQL database it has, with every user of them and their passwords, and a PostgreSQL database's
sixpanel.jsonsetup. Each is compared on both servers table by table, row by row and counter by counter (Move between servers). A MongoDB or SQL Server database is not carried yet: a website that has one is refused before anything is copied, and told which one — export it, remove it, move the website, then add it on the other server and import the file.
Tia
Tia can list a website's databases, their users, tables and sizes, and — asking you first — add or delete a database, add a user or change its access, run the table upkeep, change the character set and export. She never shows a password, downloads an export or imports a file: those are yours, on the website's Database page.
How to check it worked
- Software → PostgreSQL reads running, on
127.0.0.1only, and Health has a green PostgreSQL row. - The website's Databases card lists the new database with its engine and a size.
- On the server:
sudo -u postgres psql -c '\l'lists it, owned by its own user;
| `sudo ss -ltnp | grep postgres shows 127.0.0.1:5432` and nothing on a public address. |
|---|
- From the website's account, its user connects: for PostgreSQL,
psql -h 127.0.0.1 -p 5432 -U site_shop_reports site_shop_reports -c 'select 1'(the port, user and database as Connection shows them) asks for the password — paste it from Show password. Never put the password on the command line, nor a connection URL that holds it: a program's command line is in the process list, which every account on the server reads.
If it went wrong
- "PostgreSQL is not installed on this server" when adding a database — install it on Software first; the dialog links there.
- A name is refused as already used — another website, a shop or the engine itself has it. Choose another name; Server → Database lists what is there.
- The PHP app says it cannot find a driver — the website's PHP version lacks
pdo_pgsql. Install thepgsqlextension for that version on Software → PHP, or add the database again (its job installs it when it is missing). - A move is refused because of other databases — export them on the Database page, remove them, move, then add and import them on the other server.
- PostgreSQL's Health row says its access rules changed — press Restart on its Software view (or restart the panel): SixPanel writes its block at the top again.
The software card on this page
A project's or website's Database page shows the cards of the database engines (and the Redis) it uses. It is the same card as on Software: its state, its version, a waiting update and, for the owner, Restart (asked first, and it waits for any job that is running). On Software opens its card there, with who else uses it. See Software, search and the system monitor.
Something unclear?Ask Tia