| Welcome, Guest | 
 
You have to register before you can post on our site. 
 
 | 
 
  
 
 
| Online Users | 
 
There are currently 8 online users. » 0 Member(s) | 7 Guest(s) Google
 | 
 
 
 
| Latest Threads | 
 
Test, just a XRumer 23 St...
 
Forum: Announcements 
Last Post: XRumer23lip 
09-25-2025, 01:01 AM 
» Replies: 0 
» Views: 27
 | 
 
Comment créer un sous-dom...
 
Forum: Cpanel 
Last Post: XRumer23lip 
10-28-2024, 04:29 AM 
» Replies: 1 
» Views: 1,186
 | 
 
Tutorial: Create an Onlin...
 
Forum: Ellohost 
Last Post: mikox 
08-03-2024, 07:46 AM 
» Replies: 0 
» Views: 283
 | 
 
Tutoriel : Créer un Site ...
 
Forum: Ellohost  
Last Post: mikox 
08-03-2024, 07:45 AM 
» Replies: 0 
» Views: 311
 | 
 
Tutorial: Create a Profes...
 
Forum: Ellohost 
Last Post: mikox 
08-03-2024, 07:13 AM 
» Replies: 0 
» Views: 217
 | 
 
Tutoriel : Créer un Site ...
 
Forum: Ellohost  
Last Post: mikox 
08-03-2024, 07:12 AM 
» Replies: 0 
» Views: 248
 | 
 
Slither.io - Become the L...
 
Forum: Others 
Last Post: mikox 
04-05-2024, 07:30 AM 
» Replies: 0 
» Views: 307
 | 
 
MooMoo.io - Build, Defend...
 
Forum: Others 
Last Post: mikox 
04-05-2024, 07:28 AM 
» Replies: 0 
» Views: 327
 | 
 
Smash Karts - The Ultimat...
 
Forum: Others 
Last Post: mikox 
04-05-2024, 07:26 AM 
» Replies: 0 
» Views: 708
 | 
 
Dream Chef - A Cooking Ad...
 
Forum: Others 
Last Post: mikox 
04-05-2024, 07:24 AM 
» Replies: 0 
» Views: 303
 | 
 
 
 
 | 
  | 
|   How to Configure PostgreSQL Server | 
 
| 
Posted by: aaron  - 09-08-2023, 01:31 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Configure PostgreSQL Server</title> 
</head> 
 
<body> 
    <p>Configure your PostgreSQL server to allow other systems to access the database remotely. To do so, let the server listen to all IP addresses by editing the configuration file.</p> 
 
    <p>Before proceeding, use the exit command to quit the PostgreSQL shell and return as the regular system user. Then, follow these steps:</p> 
 
    <ol> 
        <li>Open the configuration file using a text editor. Replace vim if you use another editor and change the directory accordingly:</li> 
        <pre><code>vim /etc/postgresql/14/main/postgresql.conf</code></pre> 
        <li>Find the listen_addresses line.</li> 
        <li>Remove the # symbol and change the value to an asterisk. Here’s how it should look:</li> 
        <pre><code>listen_addresses = '*'</code></pre> 
        <li>Use the :wq command to save the changes and quit vim.</li> 
        <li>Set the access policy to authenticate client connection to your PostgreSQL server. To do so, open the pg_hba.conf file in the same directory using vim. The command should look like this:</li> 
        <pre><code>vim /etc/postgresql/14/main/pg_hba.conf</code></pre> 
        <li>Add a new policy at the bottom of the file using this syntax:</li> 
        <pre><code>connection database user ip_address encryption</code></pre> 
        <li>For instance, we will enable all TCP/IP connections from all users to every PostgreSQL database. These users can use any IP address with an MD5-encrypted password. The rule looks as follows:</li> 
        <pre><code>host all all 0.0.0.0/0 md5</code></pre> 
        <li>Restart the PostgreSQL service to apply the changes.</li> 
    </ol> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Create a Database on PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:28 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Create a Database on PostgreSQL</title> 
</head> 
 
<body> 
    <p>PostgreSQL assumes the role and the database will have the same name. Therefore, if you create a TheNewUser role, PostgreSQL will access a database with the same name.</p> 
 
    <p><strong>Important!</strong> PostgreSQL uses Linux information for authentication. In the previous example, you need a user called TheNewUser.</p> 
 
    <p>Here are the PostgreSQL database setup steps:</p> 
 
    <p>Run the following to switch to the postgres user and create a new database:</p> 
 
    <pre><code>sudo -u postgres createdb TheNewUser</code></pre> 
 
    <p>To log in to the new database, create a Linux user account with the same name. Since the username contains capital letters, add the <code>--force-badname</code> option.</p> 
 
    <pre><code>sudo adduser TheNewUser --force-badname</code></pre> 
 
    <p>Enter the interactive PostgreSQL prompt using the new user account:</p> 
 
    <pre><code>sudo -u TheNewUser psql</code></pre> 
 
    <p>Confirm the connection using this command:</p> 
 
    <pre><code>\conninfo</code></pre> 
 
    <img src="https://ellohost.com/imageshack/uploads/1694179579_64fb20fb16b8d.webp"> 
 
    <p>The user should now connect to the new database and be able to create a new table. For example, enter the following to create a buyer data table:</p> 
 
    <pre><code>CREATE TABLE buyers(usr_id INT PRIMARY KEY, usr_name VARCHAR(240) NOT NULL, usr_location VARCHAR(240) NOT NULL);</code></pre> 
 
    <p>When creating a database table, consider the six PostgreSQL constraints:</p> 
 
    <ul> 
        <li><strong>PRIMARY KEY</strong> – indicates that a column can be a row’s unique identifier.</li> 
        <li><strong>FOREIGN KEY</strong> – specifies that the values in a column must be the same as the ones in another table’s rows.</li> 
        <li><strong>NOT NULL</strong> – ensures a column’s value is not empty.</li> 
        <li><strong>CHECK</strong> – sets a column’s value so that it must satisfy a Boolean expression, which is either “true” or “false”.</li> 
        <li><strong>UNIQUE</strong> – guarantees that the values in a column are unique among all rows.</li> 
        <li><strong>EXCLUSION</strong> – prevents values in two rows from overlapping when compared.</li> 
    </ul> 
 
    <p>To add values to your table, use the following statement. Don’t forget to replace the placeholders with the appropriate value and adjust the number of rows accordingly:</p> 
 
    <pre><code>INSERT INTO tablename (column1, column2, column3) VALUES (row1, row2, row3);</code></pre> 
 
    <p>To show the table, enter the following statement:</p> 
 
    <pre><code>SELECT * FROM tablename</code></pre> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Créer une base de données sur PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:27 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Créer une base de données sur PostgreSQL</title> 
</head> 
 
<body> 
    <p>PostgreSQL suppose que le rôle et la base de données auront le même nom. Par conséquent, si vous créez un rôle TheNewUser, PostgreSQL accèdera à une base de données portant le même nom.</p> 
 
    <p>Important ! PostgreSQL utilise les informations Linux pour l'authentification. Dans l'exemple précédent, vous avez besoin d'un utilisateur appelé TheNewUser.</p> 
 
    <p>Voici les étapes de configuration de la base de données PostgreSQL :</p> 
 
    <p>Exécutez la commande suivante pour passer à l'utilisateur postgres et créer une nouvelle base de données :</p> 
 
    <pre><code>sudo -u postgres createdb TheNewUser</code></pre> 
 
    <p>Pour vous connecter à la nouvelle base de données, créez un compte utilisateur Linux portant le même nom. Étant donné que le nom d'utilisateur contient des lettres majuscules, ajoutez l'option --force-badname.</p> 
 
    <pre><code>sudo adduser TheNewUser --force-badname</code></pre> 
 
    <p>Accédez à l'invite de commande interactive PostgreSQL à l'aide du nouveau compte utilisateur :</p> 
 
    <pre><code>sudo -u TheNewUser psql</code></pre> 
 
    <p>Confirmez la connexion à l'aide de cette commande :</p> 
 
    <pre><code>\conninfo</code></pre> 
 
    <img src="https://ellohost.com/imageshack/uploads/1694179579_64fb20fb16b8d.webp"> 
 
    <p>L'utilisateur devrait maintenant se connecter à la nouvelle base de données et être en mesure de créer une nouvelle table. Par exemple, saisissez ce qui suit pour créer une table de données acheteur :</p> 
 
    <pre><code>CREATE TABLE buyers(usr_id INT PRIMARY KEY, usr_name VARCHAR(240) NOT NULL, usr_location VARCHAR(240) NOT NULL);</code></pre> 
 
    <p>Lors de la création d'une table de base de données, tenez compte des six contraintes PostgreSQL :</p> 
 
    <ul> 
        <li>PRIMARY KEY : indique qu'une colonne peut être un identifiant unique d'une ligne.</li> 
        <li>FOREIGN KEY : spécifie que les valeurs d'une colonne doivent être identiques à celles des lignes d'une autre table.</li> 
        <li>NOT NULL : garantit qu'une valeur de colonne n'est pas vide.</li> 
        <li>CHECK : définit la valeur d'une colonne de manière à ce qu'elle doit satisfaire une expression booléenne, qui est soit "true" ou "false".</li> 
        <li>UNIQUE : garantit que les valeurs d'une colonne sont uniques parmi toutes les lignes.</li> 
        <li>EXCLUSION : empêche que les valeurs de deux lignes se chevauchent lorsqu'elles sont comparées.</li> 
    </ul> 
 
    <p>Pour ajouter des valeurs à votre table, utilisez la déclaration suivante. N'oubliez pas de remplacer les espaces réservés par la valeur appropriée et d'ajuster le nombre de lignes en conséquence :</p> 
 
    <pre><code>INSERT INTO tablename (column1, column2, column3) VALUES (row1, row2, row3);</code></pre> 
 
    <p>Pour afficher la table, saisissez la déclaration suivante :</p> 
 
    <pre><code>SELECT * FROM tablename</code></pre> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoindre ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Créer un utilisateur sur PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:21 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Créer un utilisateur sur PostgreSQL</title> 
</head> 
 
<body> 
    <p>Pour gérer l'accès à la base de données et assurer une organisation adéquate des données, vous aurez besoin de plusieurs utilisateurs PostgreSQL. La manière la plus simple d'en créer un est d'utiliser le mode interactif. Voici les étapes :</p> 
 
    <p>Passer à l'utilisateur postgres :</p> 
 
    <pre><code>sudo su - postgres</code></pre> 
 
    <p>Exécutez cette commande pour créer un nouvel utilisateur :</p> 
 
    <pre><code>createuser --interactive</code></pre> 
 
    <p>Entrez le nom du nouveau compte PostgresQL. Pour ce tutoriel, il s'agit de TheNewUser.</p> 
 
    <p>Pour valider le nouveau rôle, connectez-vous à PostgreSQL avec le compte postgres :</p> 
 
    <pre><code>sudo -u postgres psql</code></pre> 
 
    <p>Vérifiez tous les utilisateurs avec la commande suivante :</p> 
 
    <pre><code>\du</code></pre> 
 
    <p>Comme indiqué dans la sortie, la base de données a créé avec succès TheNewUser.</p> 
    <img src="https://ellohost.com/imageshack/uploads/1694178324_64fb1c14c5d99.jpeg"> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoindre ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Create a User on PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:20 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Create a User on PostgreSQL</title> 
</head> 
 
<body> 
    <p>To manage database access and ensure proper data organization, you will need multiple PostgreSQL users. The easiest way to create one is to use the interactive mode. Here are the steps:</p> 
 
    <p>Switch to the postgres user:</p> 
 
    <pre><code>sudo su - postgres</code></pre> 
 
    <p>Run this command to create a new user:</p> 
 
    <pre><code>createuser --interactive</code></pre> 
 
    <p>Enter the new PostgresQL account name. For this tutorial, it is TheNewUser.</p> 
 
    <p>To validate the new role, log in to PostgreSQL with the postgres account:</p> 
 
    <pre><code>sudo -u postgres psql</code></pre> 
 
    <p>Check all the users with the following command:</p> 
 
    <pre><code>\du</code></pre> 
 
    <p>As shown in the output, the database successfully creates TheNewUser.</p> 
    <img src="https://ellohost.com/imageshack/uploads/1694178324_64fb1c14c5d99.jpeg"> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   How to Change User Password in PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:17 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>How to Change User Password in PostgreSQL</title> 
</head> 
 
<body> 
    <p>Changing the default postgres role password is essential to improve database security. Here’s how to do it:</p> 
 
    <p>Activate the PostgreSQL prompt using this command:</p> 
 
    <pre><code>sudo -u postgres psql</code></pre> 
 
    <p>Run this statement to change the postgres account password. Don’t forget to replace NewPassword with your actual password:</p> 
 
    <pre><code>ALTER USER postgres PASSWORD 'NewPassword';</code></pre> 
 
    <p>Check whether the change is applied successfully using the following command:</p> 
 
    <pre><code>\p</code></pre> 
 
    <p>Restart the PostgreSQL service using this command:</p> 
 
    <pre><code>sudo service postgresql restart</code></pre> 
    <img src="https://ellohost.com/imageshack/uploads/1694178239_64fb1bbf29dc2.webp"> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Comment changer le mot de passe utilisateur dans PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:15 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Comment changer le mot de passe utilisateur dans PostgreSQL</title> 
</head> 
 
<body> 
    <p>Changer le mot de passe du rôle postgres par défaut est essentiel pour améliorer la sécurité de la base de données. Voici comment faire :</p> 
 
    <p>Activez l'invite PostgreSQL en utilisant la commande suivante :</p> 
 
    <pre><code>sudo -u postgres psql</code></pre> 
 
    <p>Exécutez cette instruction pour changer le mot de passe du compte postgres. N'oubliez pas de remplacer NewPassword par votre mot de passe réel :</p> 
 
    <pre><code>ALTER USER postgres PASSWORD 'NewPassword';</code></pre> 
 
    <p>Vérifiez si le changement est appliqué avec succès en utilisant la commande suivante :</p> 
 
    <pre><code>\p</code></pre> 
 
    <p>Redémarrez le service PostgreSQL en utilisant cette commande :</p> 
 
    <pre><code>sudo service postgresql restart</code></pre> 
    <img src="https://ellohost.com/imageshack/uploads/1694178239_64fb1bbf29dc2.webp"> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoignez ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   Comment se connecter à PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:14 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>Comment se connecter à PostgreSQL</title> 
</head> 
 
<body> 
    <p>Pendant l'installation, PostgreSQL crée automatiquement le rôle postgres par défaut pour se connecter à la base de données. Pour passer à cet utilisateur, exécutez la commande suivante :</p> 
 
    <pre><code>sudo su - postgres</code></pre> 
 
    <p>Votre ligne de commande devrait maintenant commencer par postgres. Pour vous connecter à la base de données PostgreSQL, utilisez le shell PostgreSQL avec la commande suivante :</p> 
 
    <pre><code>sudo psql</code></pre> 
 
    <p>La commande psql créera une session dans la base de données par défaut. Si la commande n'est pas trouvée, installez manuellement le client PostgreSQL en utilisant la commande suivante :</p> 
 
    <pre><code>sudo apt-get install postgresql-client</code></pre> 
 
    <p>Pour vérifier l'état de la connexion, exécutez cette commande en utilisant l'invite PostgreSQL :</p> 
 
    <pre><code>\conninfo</code></pre> 
    <img src="https://ellohost.com/imageshack/uploads/1694178166_64fb1b7670fda.webp"> 
 
    <p>Pour quitter l'invite PostgreSQL et revenir à l'utilisateur système normal, utilisez la commande exit. Utilisez \q pour vous détacher de la session interactive de la base de données.</p> 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Rejoignez ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   How to Connect to PostgreSQL | 
 
| 
Posted by: aaron  - 09-08-2023, 01:13 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>How to Connect to PostgreSQL</title> 
</head> 
 
<body> 
    <p>During the installation, PostgreSQL automatically creates the default postgres role for logging in to the database. To switch to this user, run the following command:</p> 
 
    <pre><code>sudo su - postgres</code></pre> 
 
    <p>Your command line should now begin with postgres. To connect to the PostgreSQL database, use the PostgreSQL shell using the following:</p> 
 
    <pre><code>sudo psql</code></pre> 
 
    <p>The psql command will create a session in the default database. If the command isn’t found, manually install the PostgreSQL client using this command:</p> 
 
    <pre><code>sudo apt-get install postgresql-client</code></pre> 
 
    <p>To check the connection status, run this command using the PostgreSQL prompt:</p> 
 
    <pre><code>\conninfo</code></pre> 
    <img src="https://ellohost.com/imageshack/uploads/1694178166_64fb1b7670fda.webp"> 
 
    <p>To quit the PostgreSQL prompt and return to the regular system user, use the exit command. Meanwhile, use \q to detach from the database’s interactive session.</p> 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
|   How to Check PostgreSQL Status | 
 
| 
Posted by: aaron  - 09-08-2023, 01:11 PM - Forum: Others 
- No Replies
 | 
 
	
		
  | 
		
			 
				<!DOCTYPE html> 
<html> 
 
<head> 
    <title>How to Check PostgreSQL Status</title> 
</head> 
 
<body> 
    <p>After installing PostgreSQL, check whether it is enabled and active. Use the systemctl or service command utility to verify the service status:</p> 
 
    <pre><code>sudo service postgresql status</code></pre> 
 
    <pre><code>sudo systemctl status postgresql</code></pre> 
 
    <p>If PostgreSQL is enabled, your command line will output active and loaded, similar to the following:</p> 
    <img src="https://ellohost.com/imageshack/uploads/1694178116_64fb1b441cb8f.webp"> 
 
    <p>In addition to the service status, check whether PostgreSQL is ready to accept a connection using this command:</p> 
 
    <pre><code>sudo pg_isready</code></pre> 
 
    <br><br> 
    <a href="https://ellohost.com"><button style="padding: 10px 20px; background-color: blue; color: blue; border: none;">Join ellohost</button></a> 
</body> 
 
</html>
			 
			
		 | 
	 
	
		
			
				 
			
		 | 
	 
 
 | 
 
 
 
 |