[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: posgresql 7.2.1 & pg_hba.conf



Le 05/08/04 ? 23:25, philippe L écrivait:

> Je veux pas de PHP, je veux le client ODBC , j'ai pas encore r?ussi a
> cr?er une BDD, :(

Bon on s'occupera de ton client odbc plus tard.

Pour vĂrifier que ton serveur tourne, on fait un petit coup de "ps"
  bazooka:~# ps ax | grep postgres
  20404 pts/0    S      0:00 /usr/lib/postgresql/bin/postmaster -D /var/lib/postgres/data
  20409 pts/0    S      0:00 postgres: stats buffer process                              
  20410 pts/0    S      0:00 postgres: stats collector process                           

On suppose que c'est ok sinon tu montres ton fichier de config.

Pour crĂ©er unebase Postgres, il faut ĂȘtre un peu plus "ioux" qu'un utilisateur MySQL.

Sous root, passer la ligne suivante pour devenir administrateur postgres:
  bazooka:~# su - postgres
  postgres@bazooka:~$

maintenant on cré sa base :
  postgres@bazooka:~$ createdb demo
  CREATE DATABASE

et maintenant on va sur sa base de donnĂes:
  postgres@bazooka:~$ psql demo
  Welcome to psql 7.4.3, the PostgreSQL interactive terminal.
  
  Type:  \copyright for distribution terms
         \h for help with SQL commands
         \? for help on internal slash commands
         \g or terminate with semicolon to execute query
         \q to quit

On jette un coup d'oeil aux bases qui existent:
  demo=# \l
          List of databases
     Name    |  Owner   | Encoding 
  -----------+----------+----------
   ailleurs  | jpourrez | LATIN9
   basetest  | postgres | LATIN9
   demo      | postgres | LATIN9
   template0 | postgres | LATIN9
   template1 | postgres | LATIN9
  (5 rows)

Maintenant tu peux jouer avec SQL

Si tu as Apache et PHP sur ta machine, tu peux installer phppgadmin.
Faudra quand mĂme prendre le temps de lire la doc de PostgreSQL. C'est
un peu fastidieux mais il y a bcp d'infos intĂressantes.

Quel est l'intĂret d'ODBC ? il y a du Windows dans le coin

> merci de votre aide
J'ai fait un site web avec Postgres+PHP l'hiver dernier mais si t'as
d'autres questions faut que je rĂvise un peu ;-)

Jean-Pierre



Reply to: