1 2 3 4 5 6 7 8 9 10 sudo su - postgres psql -c "alter user postgres with password 'StrongAdminP@ssw0rd'" sudo vi /etc/postgresql/12/main/postgresql.conf listen_addresses = '*' sudo vi /etc/postgresql/12/main/pg_hba.conf host all all 192.168.10.0/24 md5 sudo systemctl restart postgresql sudo apt install pgadmin4 pgadmin4-apache2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 create table dept( id serial primary key, name varchar(20) ) create table employee1( id serial primary key, name varchar(20), age int, salary real, dept_id int references dept (id) ) insert into dept (name) values('人事部'); insert into dept (name) values('……

阅读全文