diff options
author | ChatChimi <Pichue07@gmail.com> | 2020-04-18 14:23:26 +0200 |
---|---|---|
committer | ChatChimi <Pichue07@gmail.com> | 2020-04-18 14:23:26 +0200 |
commit | dc48cf7cbca435becc481c80214b320e78825eeb (patch) | |
tree | 79642f267de8d8a04655d1ce3670a9acaeffb081 /www/howto_psql | |
parent | 1323e52025bfd6f6e7584295619002a897c8da0c (diff) | |
parent | 4378405eea982cb3a42584d95767b5003675f611 (diff) |
Merge branch 'master' of https://github.com/clyhtsuriva/ATS-Project
Diffstat (limited to 'www/howto_psql')
-rwxr-xr-x | www/howto_psql | 35 |
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 |