aboutsummaryrefslogtreecommitdiff
path: root/www/howto_psql
diff options
context:
space:
mode:
authorclyhtsuriva <clyhtsuriva@gmail.com>2020-03-29 19:53:38 +0200
committerclyhtsuriva <clyhtsuriva@gmail.com>2020-03-29 19:53:38 +0200
commitdc539fda0108dc724693fbdd7599bd86980f0de0 (patch)
tree46765165f34ac356cf0ec1aafeef29f9e8a77c66 /www/howto_psql
parent8e56aac1e0af4c724f2e6d26746217e1f1812909 (diff)
some web changes
Diffstat (limited to 'www/howto_psql')
-rwxr-xr-xwww/howto_psql35
1 files changed, 35 insertions, 0 deletions
diff --git a/www/howto_psql b/www/howto_psql
new file mode 100755
index 0000000..7d5adfc
--- /dev/null
+++ b/www/howto_psql
@@ -0,0 +1,35 @@
+#in order to make things right, you should check the following comments to visualize and use properly the PSQL database.
+
+#assuming that you installed psql prior
+#https://www.postgresql.org/download/linux/debian/
+
+#create the user
+adduser atsuser
+#use the password '123456'
+
+#connect as postgres
+su - postgres
+
+#launch the psql terminal
+psql
+
+#create the user that we use in our scripts
+CREATE USER atsuser WITH PASSWORD '123456';
+
+#create our databse
+CREATE DATABASE atsdb;
+
+#grant the privileges to our user
+GRANT ALL PRIVILEGES ON DATABASE atsdb to atsuser;
+
+#quit
+Ctrl+D
+
+#log in as atsuser
+su - atsuser
+
+#launch psql with our user and our database
+psql -d atsdb -U atsuser
+
+#initialize the tables
+\i /WHATEVER_PATH_YOUR_INIT_IS_IN/ATS-Project/website/init-bd.sql