Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ##shell
- [socorro@cyb15 scripts]$ ./setupDatabase.py
- 2009-07-23 13:02:20,980 INFO - current configuration
- databaseHost=localhost
- databaseName=socorro
- databasePassword=**********
- databaseUserName=socorro
- logFileErrorLoggingLevel=10
- logFileLineFormatString=%(asctime)s %(levelname)s - %(message)s
- logFileMaximumBackupHistory=50
- logFileMaximumSize=1000000
- logFilePathname=./setup.log
- stderrErrorLoggingLevel=10
- stderrLineFormatString=%(asctime)s %(levelname)s - %(message)s
- 2009-07-23 13:02:20,982 INFO - done.
- Traceback (most recent call last):
- File "./setupDatabase.py", line 40, in ?
- socorro_schema.setupDatabase(configurationContext, logger)
- File "/home/socorro/socorro/socorro/database/schema.py", line 1250, in setupDatabase
- databaseConnection, databaseCursor = connectToDatabase(config, logger)
- File "/home/socorro/socorro/socorro/database/schema.py", line 1243, in connectToDatabase
- databaseConnection = pg.connect(databaseDSN)
- psycopg2.OperationalError: FATAL: Ident authentication failed for user "socorro"
- ##python script
- databaseHost = cm.Option()
- databaseHost.doc = 'the hostname of the database servers'
- databaseHost.default = 'localhost'
- databaseName = cm.Option()
- databaseName.doc = 'the name of the database within the server'
- databaseName.default = 'socorro'
- databaseUserName = cm.Option()
- databaseUserName.doc = 'the user name for the database servers'
- databaseUserName.default = 'socorro'
- databasePassword = cm.Option()
- databasePassword.doc = 'the password for the database user'
- databasePassword.default = ''
- ## /var/lib/pgsql/data/pg_hba.conf
- local all all ident sameuser
- ## pg_dump socorro
- [socorro@cyb15 scripts]$ pg_dump socorro
- --
- -- PostgreSQL database dump
- --
- SET client_encoding = 'UTF8';
- SET check_function_bodies = false;
- SET client_min_messages = warning;
- --
- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
- --
- COMMENT ON SCHEMA public IS 'Standard public schema';
- --
- -- Name: public; Type: ACL; Schema: -; Owner: postgres
- --
- REVOKE ALL ON SCHEMA public FROM PUBLIC;
- REVOKE ALL ON SCHEMA public FROM postgres;
- GRANT ALL ON SCHEMA public TO postgres;
- GRANT ALL ON SCHEMA public TO PUBLIC;
- --
- -- PostgreSQL database dump complete
- --
- [socorro@cyb15 scripts]$
Add Comment
Please, Sign In to add comment