PostgreSQL/PgLoader: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
{| | {| | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="sql"> | ||
cat << DDL | | cat << DDL | mariadb | ||
CREATE DATABASE IF NOT EXISTS academia; | CREATE DATABASE IF NOT EXISTS academia; | ||
CREATE USER 'chorke'@'%' IDENTIFIED BY 'sadaqah!'; | CREATE USER 'chorke'@'%' IDENTIFIED BY 'sadaqah!'; | ||
Line 20: | Line 20: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight lang="sql"> | |||
cat << DDL | psql | |||
CREATE DATABASE academia; | |||
CREATE USER chorke WITH ENCRYPTED PASSWORD 'sadaqah!'; | |||
GRANT ALL PRIVILEGES ON DATABASE academia TO chorke; | |||
ALTER DATABASE academia OWNER TO chorke; | |||
DDL | |||
</syntaxhighlight> | |||
|- | |- |
Revision as of 06:41, 3 December 2024
cat << EXE | sudo bash
apt-get update;echo
apt list -a --upgradable
apt-get install -y pgloader
EXE
Migration
cat << DDL | mariadb
CREATE DATABASE IF NOT EXISTS academia;
CREATE USER 'chorke'@'%' IDENTIFIED BY 'sadaqah!';
GRANT ALL PRIVILEGES ON academia.* TO 'chorke'@'%';
FLUSH PRIVILEGES;
DDL
|
cat << DDL | psql
CREATE DATABASE academia;
CREATE USER chorke WITH ENCRYPTED PASSWORD 'sadaqah!';
GRANT ALL PRIVILEGES ON DATABASE academia TO chorke;
ALTER DATABASE academia OWNER TO chorke;
DDL
| |
| ||
Playground
pgloader -h
pgloader -V
|
||
| ||
References
| ||